1
Reply

What is the difference between Datetime and Datetime2?

Sateesh Arveti

Sateesh Arveti

Feb 23, 2016
1.1k
0

    1) Datetime2 introduced in SQL Server 2008 and have more precision [accuracy is 100 nanoseconds]. 2) Datetime2(precision[b/w 0-7]) takes 6-8 bytes and Datetime takes 8 bytes. 3) Datetime2 have more range [BETWEEN ‘0001-01-01 00:00:00’ AND ‘9999-12-31 23:59:59.9999999’] than Datetime[BETWEEN ‘1753-01-01 00:00:00’ AND ‘’9999-12-31 23:59:59.997’]It is recommended to use Datetime2 for all new work.

    Sateesh Arveti
    February 23, 2016
    0