MS SQL datetime up to 1/1/1900

Is it possible to save a date value up to 1-1-1900 in a column other than varchar? Or I really need to overcome this and run my own datetime library for date differences, sorting, etc.

Yes, I understand how datetime is actually stored (an integer value from a specific date), but I remember that there was another workaround from a few years ago. Now it’s just slipping away.

+4
source share
3 answers

Yes, the DateTime type SQL Server can store dates from January 1, 1753.

+3
source

SQL Server 2008 has a DATE data type that can range from 0001-01-01 to 9999-12-31.

In previous versions, your SOL is if you need a date before 1753-01-01 (minimum value for DATETIME).

+1
source

Source: https://habr.com/ru/post/1277618/


All Articles