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: format a date to Julian 'YYYYDDD'

Re: format a date to Julian 'YYYYDDD'

From: <oct1pm_at_hotmail.com>
Date: Mon, 06 Dec 1999 03:46:37 GMT
Message-ID: <82fbis$jhf$1@nnrp1.deja.com>


Mainframe's Julian date is not the samething as Oracle Julian date !

Mark was right. I am writing some interface program to Mainframe. The mainframe guys refer to 'YYYYDDD' as Julian date (The are not counting from January 1, -4712). I was only thinking from the point of Oracle programmer.

Thanks a lot, Kyte and Mark !

Andrew

In article <82bqbu$ai8$1_at_nnrp1.deja.com>,   markp7832_at_my-deja.com wrote:
> Just as an FYI to people who work in other areas or have never seen
> them, dates in the format of YYDDD where DDD is the number of the day
> in the year are very common in manufacturing systems found on
> mainframes within GM and other mid-western companies and are usually
> referred to by the documentation and by programmers as Julian dates.
>
> I realize that a 'real' Julian date is a continuing consecative
> sequential ordering of dates from some starting point, but the above
is
> the way a lot of COBOL and PL/1 programs were written. And I have
> actually the same format used in a C module or two.
>
> In article <kajf4sc293nup887c0jdegfte297q8e49t_at_4ax.com>,
> tkyte_at_us.oracle.com wrote:
> > A copy of this was sent to oct1pm_at_hotmail.com
> > (if that email address didn't require changing)
> > On Thu, 02 Dec 1999 21:38:45 GMT, you wrote:
> >
> > >Hi,
> > >
> > >The query
> > >select to_char(sysdate,'J') from dual
> > >returns '2451515'
> > >
> >
> > that is a julian date.
> >
> > YYYYDDD is *not* a julian date. A julian date is the number of days
> since noon
> > on January 1, -4712 ( see http://www.treasure-
> troves.com/astro/JulianDate.html )
> >
> > that aside, to get the format you want:
> >
> > tkyte_at_8i> select to_char( sysdate, 'YYYYDDD' ) from dual;
> >
> > TO_CHAR
> > -------
> > 1999337
> >
> > but that is *not* a julian date. what exactly are you looking for?
> can you
> > post a reference to the type of date you are interested in? Julian
> dates do not
> > include a 'YYYY' or a 'DDD'. they are simply the number of elapsed
> days since a
> > fixed point in time.
> >
> > >How can I format it to 'YYYYDDD' (in Julian) ?
> > >I.e. not something like 1999336 (which is in Gregorian)
> > >
> > >TIA
> > >
> > >Andrew
> > >
> >
> > --
> > See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to
> Oracle8i'...
> > Current article is "Part I of V, Autonomous Transactions" updated
> June 21'st
> >
> > Thomas Kyte tkyte_at_us.oracle.com
> > Oracle Service Industries Reston, VA USA
> >
> > Opinions are mine and do not necessarily reflect those of Oracle
> Corporation
> >
>
> --
> Mark D. Powell -- The only advice that counts is the advice that
> you follow so follow your own advice --
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sun Dec 05 1999 - 21:46:37 CST

Original text of this message

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