Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handling extremely large dates 1

Status
Not open for further replies.

Kavius

Programmer
Apr 11, 2002
322
CA
This is not strictly a C# question. I am thinking of building a genealogy database and it occured to me that the date ranges I could be dealing with may be outside the 1753+ date range handled by msSQL.

Rather than get myself stuck in a corner, I want to deal with it now. I can think of a couple of ways of dealing with this, but the best way I can think of is to create my own date object and just store it in the database as a 4 byte integer as minutes from zero. That should give me a range of about +/-4000 years and nobody should complain of only having accuracy to a minute in a genealogy database.

Here is the clincher. Does anyone know any source for math to determine date? Calculating the days from zero (ignoring leap seconds) is simple enough, but with months ranging from 28-31 days, I am not entirely sure about the math.

Can anyone suggest anything?
 
Astronomy! Duh... Should have thought of that.

Thanks for pointing me in the right (should have been obvious) direction.
 
Don't forget that with geneaology, you have to know where as well as when. For example, the UK didn't adopt the Gregorian calendar until 1752. Prior to that date all their dates were 11 days off from all the countries that had more influence from the Catholic Church. Greece waited until 1923, Russia didn't adopt it until 1918, and the Russian Orthodox Church still doesn't use it.

Also, the Muslim calendar is tied to the lunar month, so important events such as Ramadan can ocurr at any time (going by the Gregorian calendar).

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Ya, I found this link after the fact.


Has a lot of the formats and the formulas for converting between them.

I think I'll stick to gregorian for now. Don't know what I'm going to do about the dates that the monks were leap yearing every three years...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top