The date functions manipulate values of the datatypes datetime, smalldatetime, date or time.
Date functions can be used in the select list or where clause of a query.
Use the datetime datatype only for dates after January 1, 1753. datetime values must be enclosed in single or double quotes. Use date for dates from January, 1 0001 to January 1, 9999. date values must be enclosed in single or double quotes. Use char, nchar, varchar or nvarchar for earlier dates. Adaptive Server recognizes a wide variety of date formats. See Datatype conversion functions and “Date and time datatypes” for more information.
Adaptive Server automatically converts between character and datetime values when necessary (for example, when you compare a character value to a datetime value).
The date datatype can cover dates from January 1, 0001 to January 1, 9999.