DATETIME
|
DATETIME2
|
Date range is between January 1, 1753 through December 31, 9999
|
Date range is between January 1, 0001AD through December 31, 9999 AD
|
Time range is between 00:00:00 through 23:59:59.997
|
Time range is between 00:00:00 through 23:59:59.9999999
|
Syntax is simply DATETIME
DECLARE @CurrentDate DATETIME
|
Syntax is DATETIME2 [ (Fractional Seconds Precision) ], with a default value of 7 for the fractional seconds precision.
DECLARE @CurrentDateTime DATETIME2(7)
|
Accuracy is up to 0.00333 second
|
Accuracy is up to 100 nanoseconds
|
Storage size is 8 bytes
|
Storage size is between 6 to 8 bytes
|
Character length is from 19 positions minimum (YYYY-MM-DD hh:mm:ss) to 23 maximum (YYYY-MM-DD hh:mm:ss.000)
|
Character length is from 19 positions (YYYY-MM-DD hh:mm:ss) minimum to 27 maximum (YYYY-MM-DD hh:mm:ss.0000000)
|
No precision or scale can be specified
|
Precision or scale is from 0 to 7 digits, with an accuracy of 100ns and a default precision value of 7 digits.
|
Available from SQL Server 2000 and onwards
|
Available only from SQL Server 2008 and onwards
|