DateTimeToString
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
Refer to the section titled Date and Time Format Strings for more information on the meaning of the fmt argument.