Re: Date problem ---- SOS
From: Paul Clayton <Paul.Clayton_at_adl.soils.csiro.au>
Date: 1995/11/14
Message-ID: <4896ki$p8u_at_hercules.its.csiro.au>#1/1
Date: 1995/11/14
Message-ID: <4896ki$p8u_at_hercules.its.csiro.au>#1/1
In article <47tli9$ioo_at_ixnews6.ix.netcom.com>,
ddhond_at_ix.netcom.com (Dinar Dhond ) wrote:
> We have a legacy application which store date in a form similar to
>Julian date with 1 starting at 1-1-1969.
>
>e.g. 10175 = 09-Nov-1995
>
> I would like to be able to convert the number viz. 10175 in the form
>mm-dd-yy. Does anybody know an algorithm that I can use to convert the
>number to a date.
>
assuming the Julian date is held in column OLD_DATE as a number, and you have created a new column, type DATE, called NEW_DATE, how about something like:
update <table_name>
set NEW_DATE = TO_DATE('01-JAN-69') + (OLD_DATE - 1);
PC
Paul Clayton Tel:+61-8-303-8408 CSIRO Div. Soils, Adelaide, Sth Australia Fax:+61-8-303-8550 ==================================================================================Received on Tue Nov 14 1995 - 00:00:00 CET
