SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 how to store and manipulate Very Old dates ?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Noeld
Starting Member

USA
5 Posts

Posted - 12/05/2000 :  17:37:47  Show Profile  Visit Noeld's Homepage  Reply with Quote
I need to store and perform some calculations with dates earlier than 1500 but datetime type and smalldatetime type do not allow those values

How to Proceed ???

Note: the range of those dates can be between year 1 and 2010

Thanks

robvolk
Most Valuable Yak

USA
15668 Posts

Posted - 12/05/2000 :  18:30:18  Show Profile  Visit robvolk's Homepage  Reply with Quote
You could fake it, something like storing the year, day and month in separate fields, and then write a trigger to do some simple validation to ensure a correct date. You'd lose the ability to do DateDiff() and DateAdd(). You could try adding a differential to a regular date (say 4,000 years), since you can future date to Dec. 31, 9999, but it will probably mess up your date arithmetic, and you'll need to do some fancy calculations to display the date correctly.

Some problems, though: the Gregorian calendar, which we sort of use, was FUBARed in October 1582 and two weeks were removed, (don't know if you knew that or not), so your math would have to account for that too. There were other calendar anomalies during the time period you'd be recording (no leap year, etc.)

If you can use Oracle, it can handle ungodly date ranges (Jurassic, Cretaceous, Big Bang, you get the idea).


Edited by - robvolk on 12/05/2000 18:38:01
Go to Top of Page

Noeld
Starting Member

USA
5 Posts

Posted - 12/05/2000 :  19:05:27  Show Profile  Visit Noeld's Homepage  Reply with Quote
thanks

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000