This is two date/time functions that returns the date/time in the users default format
without the need for a mask$ (at least I hope they work that way).
I'm using them in a text editor Edit/Date Edit/Time menu to insert the result at the
caret position. Please tell me if they return wrong results in other parts of the world.
Code: Select all
procedure.s dateStr()
str.s = Space(12)
GetDateFormat_(#LOCALE_USER_DEFAULT, 0, 0, 0, str, 12)
ProcedureReturn str
EndProcedure
procedure.s timeStr()
str.s = Space(12)
GetTimeFormat_(#LOCALE_USER_DEFAULT, 0, 0, 0, str, 12)
ProcedureReturn str
EndProcedure
messageRequester("Localised Date/Time:", dateStr() + #CRLF$ + timeStr())
end