Algosim documentation: DateTimeString

DateTimeString

Returns a textual representation of a date and time value in the default format of a specified locale.

Syntax

Description

If t is a datetime value and ls a locale specifier in the “language-COUNTRY” format, then DateTimeString(t, ls) returns a string with t formatted in the default date and time format of ls.

If ls is omitted omitted, the system’s current locale is used.

Examples

DateTimeString(now(), "sv-SE")
2020-09-05 19:57:12
DateTimeString(now(), "en-GB")
05/09/2020 19:57:12
DateTimeString(now(), "en-US")
9/5/2020 7:57:12 PM
DateTimeString(now(), "da-DK")
05-09-2020 19:57:12
DateTimeString(now(), "ru-RU")
05.09.2020 19:57:12

See also