Description
Converts a DateTime into a string.
Syntax
DateTimeToString ( datetime, fmt )
Arguments
datetime is a DateTime, and
fmt is a string identifying how to format the DateTime.
Example
Converts a datetime to a formatted string mm/dd/yyyy hh:mm:ss tt for all features where the country is Canada.
select DateTimeToString(RANDOMDATETIME, 'mm/dd/yyyy hh:mm:ss tt') from countries where country='Canada'Remarks
For more information about the meaning of the fmt argument, see Date and Time Format Strings section.