Get timestamp of a tag in an expression

Hello folks,

I'm trying to build an expression that will calculate the seconds between now() and a tag timestamp.

But how ti get the timestamp of a tag in an expression? I can't find anything so far...

Thanks.

You would bind to the .timestamp property of the tag in a tag binding. Use that value in your expression. If not an indirect binding, you can also just put that inside the curly braces in your expression.

There must be something I'm missing...

image

See bold.

{[.]State.timestamp}

FWIW, I'd use secondsBetween() over dateDiff when always using seconds.

It work. I knew it would be something easy that I was missing.

Thanks!

1 Like