The first date is obtained as [/system clock get date]
I want to add either a standard time (i.e. 2d12:10:09 or 36:10:09 or 12:10:09) or just a number of days (i.e. 2d or 2)
I have also tried using :totime and concatenation, none produce the desired result.
As an example, if performed on February 26th of 2013, the desired output of adding [/system clock get date] and 2d12:00:00 should return feb/28/2013 if performed before noon or mar/01/2013 if run on or after noon.
I have no problems adding time to time in the above manners.
Code: Select all
>:put ([/system clock get time]+("72:53:27"))
3d11:37:51
Code: Select all
> :put ([/system clock get date])
feb/06/2013
> :put ([/system clock get date]+"2d")
Script Error: cannot add string to string
> :put ([/system clock get date]+"2")
Script Error: cannot add string to string
> :put ([/system clock get date]+2)
Script Error: cannot add string to time interval
> :put ([/system clock get date]+2d)
Script Error: cannot add string to ip address
> :put ([/system clock get date]+2d12:10:09)
Script Error: cannot add string to ip address
> :put ([/system clock get date]+36:10:09)
Script Error: cannot add string to ip address
> :put ([/system clock get date]+"2d12:10:09")
Script Error: cannot add string to string
> :put ([/system clock get date]+"36:10:09")
Script Error: cannot add string to string
> :put ([/system clock get date]+[:totime [/system clock get time]])
Script Error: cannot add string to ip address
> :put ([/system clock get date].[:totime [/system clock get time]])
feb/06/201311:29:09