Assigning Hour of Day to Tag

I’m trying to create a tag with the value equal to the hour of the day.

I tried creating an expression tag with the Expression:
1 system.date.getHour24(system.date.now())

This function returns the correct value in the script console, but will not work as an Expression Tag, Expression.

Any other ideas?

Try the expression:
dateExtract(now(), “hour”)

You can shorten it to:

getHour24(now())

The reason is that expression language is different than scripting language. :wink:

EDIT: Sorry, had to modify it a bit further…

2 Likes