DateToString

Description

Converts a Date into a string.

Syntax

DateToString ( date, fmt)

Arguments

date is a date, and

fmt is a string identifying how to format the date.

Example

Converts a date to a formated string mm-dd-yy for all features where the country is Canada.

select DateToString(RANDOMDATE, 'mm-dd-yy') 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.

DateToString works with both Date and DateTime values.