Date and Time Datatypes

Use the datetime and smalldatetime datatypes to store date and time information from January 1, 1753 through December 31, 9999. Use date for dates from January 1, 0001 to December 31, 9999 or time for 12:00:00 a.m. to 11:59:59:999.

Dates outside this range must be entered, stored, and manipulated as char or varchar values.

Enclose date and time information in single or double quotes. You can enter it in either uppercase or lowercase letters and include spaces between data parts. SAP ASE recognizes a wide variety of data entry formats. However, SAP ASE rejects values such as 0 or 00/00/00, which are not recognized as dates.

The default display format for dates is “Apr 15 1987 10:23p.m.”. You can use the convert function for other formats. You can also perform some arithmetic calculations on datetime values with the built-in date functions, although SAP ASE may round or truncate millisecond values, unless you use the time datatype.

For bigdatetime and bigtime, the value that appears reflects microsecond precision. bigdatetime and bigtime have default display formats that accomodate this increased precision.
Related concepts
Managing Data