|
Re: Julian date from DB2 [message #99308 is a reply to message #99306] |
Mon, 08 April 2002 00:46 |
Frank Naude
Messages: 4587 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
|
|
|