SQL Server 2005
Datetime and smalldatetime date types are used to represent the date and time of a day.
Datetime ranges from January 1-9, 1753 to December 31, 999, with an accuracy of 3.33 milliseconds.
Smalldatetime ranges from January 1, to January 1, with an accuracy of 1 minute.
Note:
1. SQL server uses two 4-byte Integers to represent datetime.
The first 4 bytes saves the number of days before or after the benchmark date. The reference date is, which is the reference time of the system.
The second 4-byte stores the time after midnight, with an accuracy of 1/300.
Values of the datetime type are rounded to. 000,. 003,. 007.
(9, 0, 1 then 0) (2, 3, 4 then 3) (5, 6, 7, 8 then 7)
2. the date and time represented by smalldatetime are not precise with datetime. SQL Server uses two 2-byte integers.
The first 2 bytes is the number of days before or after the benchmark date.
The second 2-byte stores the minutes after midnight.
Smalldatetime type value
Listen 29.99 move down to the nearest minute
Round 29.98 rounded up to the last minute
Date and Time