The FormatShortDateTime function is a built-in function that builds a Text output of the specified DateTime value in the format YYYY-MM-DD hh:mm:ss, separating all date components with date_separator and all time components with time_separator. The date and time components are separated by a blank space.

Changing the environment date format, does not change the way the FormatShortDateTime function formats the dates.

Input parameters

value: DateTime Type

date_separator: Text Type

time_separator: Text Type

Output parameters

Text Type




FormatShortDateTime(#1982-05-21 22:20:30#, "-", ":")

"1982-05-21 22:20:30"

FormatShortDateTime(#1982-05-21 22:20:30#, "_/_", "_-_")

"1982_/_05_/_21 22_-_20_-_30"

See Also

Available Formatting Functions | Available Built-in Functions