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

Home -> Community -> Usenet -> c.d.o.server -> Re: Julian date conversion

Re: Julian date conversion

From: Alex Filonov <afilonov_at_yahoo.com>
Date: 12 Apr 2002 14:26:59 -0700
Message-ID: <336da121.0204121326.704fa71c@posting.google.com>


yuanjeff_at_yahoo.com (Jeff Y. Y.) wrote in message news:<a2bc9497.0204121053.755a223e_at_posting.google.com>...
> There is a table column in NUMBER(6) type that stores a date in Julian
> format (I believe). I need convert it to a regular date, but can not
> get the right YYYY. Could you please tell me what algorithm I should
> use to get the right result?
>
> Thanks a lot.
>
> ---------------------------------------------------------------
> SQL> select to_char(to_date(strt, 'J'), 'MM-DD-YYYY') "real",
> 2 to_date(strt, 'dd/mm/yy') "wrong",
> 3 strt
> 4 from my_table where rownum < 10;
>
> real wrong STRT
> ---------- --------- ----------
> 08-11-4436 10-OCT-32 101032
> 11-10-4436 10-NOV-23 101123
> 11-10-4436 10-NOV-23 101123
> 11-19-4436 10-NOV-32 101132
> 11-21-4436 10-NOV-34 101134
> 11-21-4436 10-NOV-34 101134
> 12-02-4436 10-NOV-45 101145
> 12-12-4436 10-NOV-55 101155
> 12-19-4436 10-NOV-62 101162
I don't think it's Julian date. Not in Oracle definition, at least:

  1* select to_char(to_date('101032', 'J'), 'MM/DD/SYYYY') FROM DUAL SQL> / TO_CHAR(TO_



08/11/-4436

You see, if you interpret it as Julian, it's way B.C. date. Received on Fri Apr 12 2002 - 16:26:59 CDT

Original text of this message

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