struct st, wYear as word, wMonth as word, wDayOfWeek as word, _ wDay as word, wHour as word, wMinute as word, wSecond as word, _ wMilliseconds as word calldll #kernel32, "GetSystemTime", st as struct, ret as long print "The current time (UTC) is "; dig2$(st.wHour.struct); ":"; _ dig2$(st.wMinute.struct); ":"; dig2$(st.wSecond.struct) end function dig2$(n) dig2$ = right$("0" + str$(n), 2) end function
|