ASA SQL Reference
SQL Functions
Alphabetical list of functions
Returns a string representing a date-expression in the specified format.
DATEFORMAT ( datetime-expression, string-expression )
datetime-expression The datetime to be converted.
string-expression The format of the converted date.
For information on date format descriptions, see DATE_FORMAT option [compatibility].
Any allowable date format can be used for the string-expression.
SQL/92 Vendor extension.
SQL/99 Vendor extension.
Sybase Compatible with Adaptive Server Enterprise.
Year 2000 complianceIt is possible to use the DATEFORMAT function to produce a string with the year value represented by only two digits. This can cause problems with year 2000 compliance even though no error has occurred.For more information on year 2000 compliance, please see Year 2000 compliance. |
DATE_FORMAT option [compatibility]
The following statement returns the value Jan 01, 1989.
SELECT DATEFORMAT( '1989-01-01', 'Mmm dd, yyyy' )