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: 4569
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: Communicating between computers
Next Topic: eBusiness Suite with 9I DB on S390
Goto Forum:

Current Time: Thu Jun 24 04:36:42 CDT 2021