When I want to compare two time values like this:
:if ([/system clock get time] < 15:00:00) do={:put true} else={:put false}
I’m getting following error:
cannot compare if string is less than time interval
When I want to compare two time values like this:
:if ([/system clock get time] < 15:00:00) do={:put true} else={:put false}
I’m getting following error:
cannot compare if string is less than time interval
Somethimes I’m getting afore mentioned message, somethimes it goes as ‘false’ no matter what time is it!
Am I doing something wrong?!
Try this:
:if ([/system clock get time] < [:totime "15:00:00"]) do={:put true} else={:put false}
–Eric
It doesn’t work, I’m getting the same message but this…
:if ([:totime [/system clock get time]] < 15:00:00) do={:put true} else={:put false}
…WORKS!
Thanks! ![]()
Weird, both work for me, as does your original (copy and paste, for both true and false).
Perhaps the version you are using returns something different for “/sys clock get time”? ![]()
[admin@EricsHome] > :put [/sys clock get time]
11:24:01
–Eric