Alphabetical list of functions
328
♦
minutes 4083 years
♦
others No overflow limit
The function returns an overflow error if you exceed these limits.
♦
SQL/92 Transact-SQL extension.
♦
Sybase Compatible with Adaptive Server Enterprise.
DATEFORMAT function [Date and time]
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" on page 181.
The following statement returns the value Jan 01, 1989.
SELECT DATEFORMAT( ’1989-01-01’, ’Mmm dd, yyyy’ )
Any allowable date format can be used for the string-expression.
♦
SQL/92 Vendor extension.
♦
Sybase Compatible with Adaptive Server Enterprise.
Year 2000 compliance
It 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" on page 297.
"DATE_FORMAT option" on page 181
DATENAME function [Date and time]
Returns the name of the specified part (such as the month "June") of a
datetime value, as a character string.
DATENAME (
date-part
,
date-expression
)
Standards and
compatibility
Function
Syntax
Parameters
Examples
Usage
Standards and
compatibility
See also
Function
Syntax