Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 date problem

Author  Topic 

mcp111
Starting Member

44 Posts

Posted - 2003-05-13 : 13:17:25
How do you store dates before 1/1/1753 in sql server?



X002548
Not Just a Number

15586 Posts

Posted - 2003-05-13 : 13:24:58
varchar(26)

Yeah, isn't that a kick?

I know it's based on math, but why the limitation?



Brett

8-)

PS BOL:


Remarks
Values with the datetime data type are stored internally by Microsoft SQL Server as two 4-byte integers.
The first 4 bytes store the number of days before or after the base date, January 1, 1900.
The base date is the system reference date. Values for datetime earlier than January 1, 1753, are not permitted.
The other 4 bytes store the time of day represented as the number of milliseconds after midnight.


Edited by - x002548 on 05/13/2003 13:27:05
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2003-05-13 : 13:31:30
Because 1752 is when the calendar was corrected and the UK (and it's colonies :)) dropped some days.
Also the year was changed to start on Jan the first in 1753.

See http://www.crowl.org/Lawrence/time/britgreg.html
and http://gean.wwco.com/articles/gregorian.html

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.

Edited by - nr on 05/13/2003 13:33:46
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-05-13 : 13:33:26
Nigel,

What don't you know?

Thanks for the link...



Brett

8-)
Go to Top of Page

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2003-05-13 : 15:06:52
See also http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=13908
I blame Henry VIII, myself.


Edited by - Arnold Fribble on 05/13/2003 15:10:02
Go to Top of Page
   

- Advertisement -