Re: pl/sql julian date conversion

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 13 Oct 1998 18:24:05 GMT
Message-ID: <362999e8.108031120_at_192.86.155.100>


A copy of this was sent to tobrien_at_reveregroup.com (if that email address didn't require changing) On Tue, 13 Oct 1998 17:31:13 GMT, you wrote:

>Here's the result I'm getting with to_date:
>
> 1* select to_date('97311','YYJJJ') from dual
>SQL> /
>ERROR:
>ORA-01810: format code appears twice
>
>no rows selected
>
>What is the proper syntax?
>

well then, thats *not* a julian date. Its the year and the number of days into the year we are. Try:

SQL> select to_date( '97311', 'YYDDD' ) from dual;

TO_DATE('



07-NOV-97
>
>In article <6vvlvh$rua$1_at_news.eecs.umich.edu>,
> fields_at_zip.eecs.umich.edu (Dr.Matt) wrote:
>> In a certain newsgroup called comp.databases.oracle.tools,
>> there was a poster called <tobrien_at_reveregroup.com>,
>> for it means . And the
>> Lord Bob spoke unto and bade
>> relay
>> <6vvkd1$iq7$1_at_nnrp1.dejanews.com> unto the people, saying:
>>
>> >Does pl/sql have a built in function to convert Julian dates to mmddyyyy
>> >format? If not, does anyone have code for this type of conversion? Thanks.
>>
>> To_date()
>>
>>
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
 

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 - 20:24:05 CEST

Original text of this message