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: 4410
Registered: April 1998
Senior Member
Hi,

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


Current Time: Sat Apr 19 02:45:05 CDT 2014

Total time taken to generate the page: 0.11753 seconds