Webcore Expression help

I’m trying to write an expression (all very new to me) that will tell me how many seconds between sunrise and sunset. I’ve managed to use the expression $sunset-$sunrise to return a value, but it has too many characters (3 extra “0” at the end). I see that I can use the “left” function to leave only the first 5 numbers, but I can’t seem to “nest” the commands together. If I use left($sunset-$sunrise, 5) it gives me “$suns” as a response.

What expression will calculate the number of seconds between sunrise and sunset? Thanks!

I’d post (or maybe someone can move) this to the Core forum or better yet take it over the the new webCore (independent of ST) forum at https://community.webcore.co/

Unfortunately I’m not much help with your specific question though.

This might be a dumb question, but have you tried simply ($sunset - $sunrise) / 1000? (This is, of course, assuming that ST Groovy time is being converted to millis.)