Date time vs small datetime in sql server 2005

DateTime
DATETIME column (or in a variable) are stored as two four-byte
integers. The first integer represents the date, and the second
integer represents the time.
We calculate the date integer against the base date January 1,
1900. The integer represents the number of days before or after
that date. As a result, the DATETIME data type supports only
dates that are represented by the integers supported by the
four-byte range. This means that a date in a DATETIME column must
fall within the range of January 1, 1753, through December 31,
9999.
The second integer in a DATETIME value, the time integer, stores
the number of 1/300-second units after midnight. This means that
the time is stored in milliseconds and is accurate to 3.33
milliseconds. Consequently, when you insert a value into a
DATETIME column, SQL Server rounds the time to .000, .003 or .007
seconds.
Small DateTimeA SMALLDATETIME value is stored as two two-byte integers. The
first integer represents the date, and the second integer
represents the time.
As with the DATETIME data type, the SMALLDATETIME date integer is
calculated against the base date January 1, 1900. However, the
integer represents only the number of days after the base date,
not the number before the date. This means that a date in a
SMALLDATETIME column must fall within the range of January 1,
1900, through June 6, 2079.
The second integer in a SMALLDATETIME value -- the time integer
-- stores the number of minutes after midnight. The time does not
reflect the number of seconds, and if seconds are included in the
value, they are rounded as follows:
Values of 29.998 seconds or less are rounded down to the nearest
minute. Values of 29.999 seconds or more are rounded up to the nearest
minute.

Popular Posts