This product version has reached end of life and is no longer supported. Click here for the latest documentation.
The DateTimeToText function is a built-in function that converts DateTime dt to a text value in which the date component is formatted according to the server's environment configuration (by default, YYYY-MM-DD).
dt : DateTime Type
Text Type
Usage |
Result |
DateTimeToText( #2015-05-21 22:20:30# ) |
"2015-05-21 22:20:30" |
DateTimeToText( #2015-05-21# ) |
"2015-05-21 00:00:00" |
DateTimeToText( #22:20:30# ) |
"1900-01-01 22:20:30" |
You should check the limits of the DateTime data type.
See Also
Available Conversion Functions to Text | Available Built-in Functions