Raymond Lewallen

Sponsors

The Lounge

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
The earliest date held by Sql Server
Ever try putting a really old date into sql server, in an actual datetime or smalldatetime column? It won't work. What if you were to have a large repository of historic information that was datestamped? You wouldn't be able to keep those datestamps in a datetime datatype in Sql Server, and I assume Sybase too.

Here's why:

1753 is the earliest year accepted by Sql Server. There are two calendar types in the western world. The Julian and the Gregorian calendars. These calendars did not match up by x number of days, depending on the year you are comparing. Eventually, countries started switching from the Julian calendar to the Gregorian calendar, which meant during the switch, they would have to skip forward anywhere from 10-13 days. Italy, Poland, Portugal, and Spain made this switch way back in 1582 and advanced 10 days forward. Great Britian made the switch in 1782, advancing 12 days forward. Albania switched in 1912, advancing 13 days forward. In the United States, depending on which part of the country you were in, you changed calendars anywhere from 1582 to 1867. Since most parts of the world changed calendars prior to 1753, this was chosen as the cut off date in Sql Server/Sybase. In order to calculate an actual date any earlier than that, you would have to go through this conversion process that would require you to know not only the country in which you are converting the date for, but also what year they did their conversion to the Gregorian calendar.

Posted 12-01-2004 1:48 PM by Raymond Lewallen

[Advertisement]

Comments

sql server t sql date wrote sql server t sql date
on 07-15-2008 11:14 AM

Pingback from  sql server t sql date

Date datatype | keyongtech wrote Date datatype | keyongtech
on 01-21-2009 11:48 PM

Pingback from  Date datatype | keyongtech

Add a Comment

(required)  
(optional)
(required)  
Remember Me?