Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: The year zero in date functions

Re: The year zero in date functions

From: John Thompson <jathomps_at_mindspring.com>
Date: Sat, 26 Sep 1998 01:22:07 GMT
Message-ID: <360c41ad.1292331862@news.mindspring.com>


There is (was) no year zero. That's why the last year of the millennium is 2000, not 1999. You shouldn't need to include it in your calculations.

John Thompson

v0139992_at_gepex.ge.com wrote:

>Hi,
>
>I have a question about the year zero in Oracle.
>
>If I enter select to_date('0000-01-01','yyyy-mm-dd') from dual I get
>ORA-01841: (full) year must be between -4713 and +9999, and not be 0 Thate
>off course means that the year zero is not a valid year. In itself the first
>day of the first year after the birth of Christ can be 1 jan 0001 and the day
>before 31 dec -0001.
>
>The bad thing is that if I enter a julian date of 1721057 I get 31 dec -0001.
>Using 1721058 gets me an error message of
>ORA-01841: (full) year must be between -4713 and +9999, and not be 0.
>Same thing for 1721423.
>1721424 gives 1 jan 0001.
>This leaves a gap of 366 days ( year 0000 should be a leap year) in the julian
>calendar.
>
>I understand it is not a big thing, but it can cause errors in subtracting
>dates going a long way back.
>
>If there is a solution, I would like to know.
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Received on Fri Sep 25 1998 - 20:22:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US