Home » Infrastructure » Other Operating Systems » Julian date from DB2
Julian date from DB2 [message #99306] Thu, 04 April 2002 14:13 Go to next message
Sandi W
Messages: 1
Registered: April 2002
Junior Member
Does anyone know how to convert a DB2 julian date to Oracle?
Re: Julian date from DB2 [message #99308 is a reply to message #99306] Mon, 08 April 2002 00:46 Go to previous message
Frank Naude
Messages: 4516
Registered: April 1998
Senior Member

Look at the following script. It gets today's Julian date from Oracle. The last statement illustrates how this Julian date can be converted back to Oracle date format.

Run the following from SQL*Plus:

alter session set nls_date_format = 'DD Month YYYY';

-- Get today's Julain date and store in variable
col julian_date new_value julian_date
select sysdate, to_char(sysdate, 'J') julian_date from dual;

-- Convert Julian date back to Oracle date format...
select to_date( to_char(&&julain_date.), 'J') from dual;

Hope it helps...

Best regards
Previous Topic: Re: Passing a9o9 parameter to a SQL*Form
Next Topic: Re: Migrating Oracle to an IBM OS390 mainframe
Goto Forum:

Current Time: Sun Aug 20 18:19:05 CDT 2017

Total time taken to generate the page: 0.10811 seconds