Expressing Universal Coordinated Time, including milliseconds
2014.04.26 01:44.30.025
Note the short-form functions to format the values:
'http://msdn.microsoft.com/en-us/library/windows/desktop/ms724390(v=vs.85).aspx
type SYSTEMTIME word wYear,wMonth,wDayOfWeek,wDay, wHour,wMinute,wSecond,wMilliseconds
sys GetSystemTime lib "kernel32.dll" (SYSTEMTIME*lpSystemTime)
SYSTEMTIME t : GetSystemTime t
string f(word v) {return mid "0"+v , -2}
string m(word v) {return mid "00"+v, -3}
print _
t.wYear "." f(t.wMonth) "." f(t.wDay) " " +
f(t.wHour) ":" f(t.wMinute) ":" f(t.wSecond) +
"." m(t.wMilliseconds)
string f(word v) {return mid "0"+v , -2}
string m(word v) {return mid "00"+v, -3}
these function can be made even shorter:
string f(word v) = mid "0"+v , -2
string m(word v) = mid "00"+v, -3
or macros can be used instead:
macro f(v) mid( "0"+v , -2)
macro m(v) mid("00"+v, -3)