Hi,guys
Is there any way to get Date (today) from MT? Like function date() in the PHP.
thx
and other day and month and year:put [/system clock get date]
or
:local datetime [/system clock get date]
Sam
haha thank you m8 you saved my day with this little trickand other day and month and year:put [/system clock get date]
or
:local datetime [/system clock get date]
Sam
:local fecha [/system clock get date]
:local dia [ :pick $fecha 4 6 ]
:local mes [ :pick $fecha 0 3 ]
:local year [ :pick $fecha 7 11 ]
:log info "date format : $dia $mes $year"
:local archivo "/myfile_$year_$mes_$dia.txt"
etc
great solution, thank you so much. you save my time.
thank you for this valuable lessonROS scripting has ridiculous support for dates.
You can't add/substract them.
You need split you date on days, months, years and then do date arithmetic taking into consideration days in the months and leap years.
From one hand it is no difficult task for programmers, but admins usually not programmers %)
Not exact answer to you question but also about dates:
viewtopic.php?t=119703
In you case task is easier (comparing to get difference between dates).