Script Error: cannot substract string from ip address

Hello all,

Ok here is my script.

{
:local sesscnt
:local sessft
:local sesstt
:foreach sesscnt in=[/tool user-manager session find where !active] do={
:set sessft [:pick [/tool user-manager session get $sesscnt from-time]]
/tool user-manager session set $sesscnt from-time=($sessft-05:00:00)
:set sesstt [:pick [/tool user-manager session get $sesscnt till-time]]
/tool user-manager session set $sesscnt till-time=($sesstt-05:00:00)
}
/tool user-manager session print file=test
}
Script Error: cannot substract string from ip address

I have it encapsulated with the {} to be able to run directly from the terminal while testing.
Anyone have an idea why the error message says ip address when the values I’m trying to pass are date/time?
Any help or script ideas are welcome. The script is to change the till-time and from-time session values from the default Universal Greenwhich Time (+0) to my time zone (-5) before writing them to a text file. The router is set as a NTP client and the clock is correct for my timezone. I have also checked the Usermanager sessions and they are also showing the correct time for the sessions. Thanks.

sometimes you have to use the :totime and :toip to cast them as such … not quite sure for sure : )

Thanks! That was the tip I needed.

Never mind the field can not be changed or updated. Keeps giving error now contact Mikrotik with support file. Will try different way.