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: pl/sql julian date conversion

Re: pl/sql julian date conversion

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 13 Oct 1998 13:48:02 GMT
Message-ID: <362459f2.91657226@192.86.155.100>


A copy of this was sent to tobrien5578_at_my-dejanews.com (if that email address didn't require changing) On Tue, 13 Oct 1998 13:22:40 GMT, you wrote:

>Does anyone have pl/sql code to convert julian dates to gregorian (regular)
>dates?? Any tips are appreciated.
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum

To convert a 'regular' date into julian you would:

SQL> select to_char( sysdate, 'j' ) from dual;

TO_CHAR



2451100

and then to take a julian and get a 'regular' date back you would:

SQL> select to_date( 2451100, 'j' ) from dual;

TO_DATE(2



13-OCT-98   Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Tue Oct 13 1998 - 08:48:02 CDT

Original text of this message

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