Setting only time in a DateTime variable

Using a hub variable with a connector to set a "time of day".

Then I use a RM rule to evaluate whether "right now" is earlier or later than the "time of day" in the hub variable.

I cannot seem to get rid of the date in the hub variable, so even though "right now" is earlier (time-wise) the rule thinks that "right now" is always later due to the DATE part of the variable being yesterday or earlier.

I know I can (by hand) go in and edit the hub variable and backspace over the date to clear it, but I need to do this via RM.

Any thoughts on how to approach this? It seems like I'm missing something.

Thanks... Mark

Open Hub Variables, and click on the value of the DateTime variable. In the page that comes up, you can clear the date. It will then go away, and you will only have time left.

3 Likes

It seems like I did this before, and things seemed to work for a while. Then somehow the date snuck in there and my rules stopped working. FYI we set the "time of day" via dashboard.

Yep I just verified. When you change the time in a dashboard device (via connector), the date comes back.

image

I'm not sure why you are using a connector. Why not just use the variable directly? Time of Day UI pickers do return today's date, and that appears to be what is happening.

I need to allow someone to change the time via dashboard. I know that we can put a date time variable as a tile on the dashboard, and I tried that today but couldn’t get away from entering the date.

I am able to set just the time of a DateTime variable on a Dashboard.

The one on the left has no date value, and the one on the right has both. These are variables, not connectors.

1 Like

Excellent, this works. I believe when I tried it before, the variable had a date set prior to me adding it to the dashboard. Tried blanking the date from the dashboard and it wouldn’t let me. Looks like the trick is to blank the date in the Hub Variables section of the web UI. Once that is set, only the time will show up on the dashboard variable tile. But if it’s a device tile from a connector, just changing the variables time will set the variables date as well.

Thank you for helping me through this. I appreciate it!

Connectors are pretty much obsolete, except for somewhat unusual uses. Dashboards aren't one of those any more.

1 Like

I keep up on firmware releases, religiously. But I missed the memo about connectors being obsolete. I use them extensively :joy:

Again, thanks for your help. :+1:

If you do not use a connector, there is no template to format a different color for each variable type like there is with a connector. They all display the same. Has this changed?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.