Monday, March 26, 2012

Julian to Gregorian and Gregorian to Julian

Are there SQL functions to convert back and forth between these two?
TIA for the help.
-- Posted with NewsLeecher v3.0 Beta 6
-- http://www.newsleecher.com/?usenetmyob@.beatles.com wrote:

> Are there SQL functions to convert back and forth between these two?
> TIA for the help.
> -- Posted with NewsLeecher v3.0 Beta 6
> -- http://www.newsleecher.com/?usenet
Not in SQL Server. This is a hard problem because no single,
universally valid conversion between Julian and Gregorian is possible.
The answer depends on what time, place and proleptic calendar you take
as your reference point. I suggest you create your own Calendar table
to do the conversion.
The last word on all the messy details can be found here:
http://www.tondering.dk/claus/calendar.html
David Portas
SQL Server MVP
--|||David Portas wrote:
> Not in SQL Server. This is a hard problem because no single,
> universally valid conversion between Julian and Gregorian is possible.
Clarification: What I mean is that any conversion you choose to apply
may or may not be factually, historically or legally accurate dependent
on geography and the date in question. You can of course choose to use
a single conversion but its validity may be only theoretical.
David Portas
SQL Server MVP
--

No comments:

Post a Comment