|
Ispirer SQLWays Database Migration Software
date, datetime, smalldatetime, time and timestamp
Date and time data types for representing date and time of day.
date
date data type is used to store year, month and day.
The range is from January 1, 0001, through December 31, 9999. Storage size is 4 bytes.
A date column can also contain an hour and minute if the TRUNCATE_DATE_VALUES option is set to OFF.
datetime
smalldatetimeThese data types are the aliases for built-in data type timestamp. These data types are used to store year, month, day, hour, minute, second and fraction of second. The fraction is stored to 6 decimal places.
The range is from January 1, 0001 00:00:00.000000, through December 31, 9999 23:59:59.999999. Storage size is 8 bytes.
These data types are provided primarily for compatibility with Adaptive Server Enterprise.
time
This data type is used to store hour, minute, second and fraction of a second. The fraction is stored to 6 decimal places. Storage size is 8 bytes.
timestamp
This data type is used to store year, month, day, hour, minute, second and fraction of second. The fraction is stored to 6 decimal places.
The range of possible dates is the same as for the date type, but the usefull range lies between 1600-02-28 23:59:59 and 7911-01-01 00:00:00. If the value is not in this range, the time portion may be incomplete. It requires 8 bytes of storage.