Time stamp for emailing

Is there a way of logging the actual time in a script.
I know the logging records the time and date of an entry.
I am sending a delayed error message of when a link went down via an email and wish to store the time in a variable to be able to add to the email. ie :set Tdown Time( Now ) or something similar.
Any suggestions ?

[admin@MikroTik] > :put [sy clock get time]
15:56:12
[admin@MikroTik] > :put [sy clock get date]
apr/22/2010

way to get the current time current date.

Thank you, now I am pushing my luck !

Is there a way to format the date retrieved from the system to “dd mmm yyyy” ?

you should be able to find script that does just that for you. There is no direct way to get different time format out of RouterOS.

Basically that is, pick part, match for something and assign value to some variable that you will use after.

If you still need that script:

[admin@MikroTik] > :local date [/sys clock get date]; :put $date; :local month [:pick $date 0 [:find $date "/" 0]]; :put $month; :local day [:pick $date ([:len $month] + 1) [:find $date "/" ([:len $month] + 1)]]; :put $day; :local year [:pick $date ([:len $month] + 1 + [:len $day] + 1) [:len $date]]; :put $year; :put "'$day $month $year'";
apr/26/2010
apr
26
2010
'26 apr 2010'