Re: Date problem ---- SOS

From: Charles Jardine <cj10_at_cam.ac.uk>
Date: 1995/11/13
Message-ID: <487epf$lr9_at_lyra.csx.cam.ac.uk>#1/1


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.
>

The arithmetic is wron. Day 1 was 1-1-1968. Day zero was 31-12-67.

Therefore:

SELECT to_char(to_date('31121967','DDMMYYYY')+10175, 'MM-DD-YY')  FROM DUAL; Received on Mon Nov 13 1995 - 00:00:00 CET

Original text of this message