Re: Date question ? Please Help

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Fri, 26 Apr 2002 17:46:15 GMT
Message-ID: <3CC99266.4BEA796_at_exesolutions.com>


wilson wrote:

> wswwong_at_hotmail.com (wilson) wrote in message news:<bf25b803.0204260415.40c9356a_at_posting.google.com>...
> > My input data for date is in this format MM/DD/YY for example
> > 02/15/54, please note that the year is actually 1954. I use the
> > sql*loader with this datatype DATE 'MM/DD/YY'; now after loading I do
> > this "select to_char(mydate, 'yyyy') from mytable" Oracle returns
> > 2054. Question what do I need to specify for the Date during
> > sqlloader to tell oracle the year is 19YY and not 20YY ? Please help.
> > Thanks in advance.
>
> Pls note that I understand the RR format of the year but if the year
> is between 00 - 49 then Oracle will assume the year to be 20xx, what
> I really want to do is to set the year to be 19YY (that is insert
> '19' in front of the year) during sqlload, any idea ? Thanks

You want to specify a two digit year and have Oracle guess as to what you want?

INSERT INTO mytable
(field_name)
VALUES
(TO_DATE('MM-DD' || '-19' || 'YY', 'MM-DD-YYYY'); Or, just reset the clock on the server back to the last century.

Daniel Morgan Received on Fri Apr 26 2002 - 19:46:15 CEST

Original text of this message