all groups > sql server programming > november 2004 >
You're in the

sql server programming

group:

Old Dates!



Re: Old Dates! Joe Celko
11/21/2004 1:18:55 PM
sql server programming: [quoted text, click to view]
<<

1) Write your own library of temporal functions.

You will need a copy of ISO-8601 for reference. You will have to decide
on rules for conversion to the CE calendar from Gregorian, Julian,
Arabic, Jewish, Chinese, etc. calendars.

There is a book of C routines for this kind of thing -- and it is packed
in my garage where I cannot find it.

2) Buy another SQL product. Both Oracle and DB2 can handle much longer
time ranges than SQL Server, for example.

--CELKO--
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are. Sample data is also a good idea, along with clear
specifications.


*** Sent via Developersdex http://www.developersdex.com ***
Re: Old Dates! Louis Davidson
11/21/2004 1:58:27 PM
What do you need to do with them? My first idea would just be to store them
in text, but if you need to do more with them, you might consider storing
your dates as an offset from some date and time, like days from 0 AD, you
could use negatives to store BC if you wanted. It isn't hard to build a
display function, if this makes sense.

--
----------------------------------------------------------------------------
Louis Davidson - drsql@hotmail.com
SQL Server MVP

Compass Technology Management - www.compass.net
Pro SQL Server 2000 Database Design -
http://www.apress.com/book/bookDisplay.html?bID=266
Note: Please reply to the newsgroups only unless you are interested in
consulting services. All other replies may be ignored :)

[quoted text, click to view]

Old Dates! Leila
11/21/2004 11:17:10 PM
Hi,
I need to store information and articles with the date before 1700. It seems
that this is not supported in SQL Server, what should I do?
Thanks,
Leila

AddThis Social Bookmark Button