Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Y2k problem with 7.3.4

Re: Y2k problem with 7.3.4

From: Arjan van Bentem <avbentem_at_DONT-YOU-DAREdds.nl>
Date: Tue, 2 Mar 1999 18:57:38 +0100
Message-ID: <36dc269b$0$24066@newton>


Carl A. Dotger wrote
>select end_date from period_setup
>order by end_date
>
>1-Jan-00
>1-Jan-98
>1-Jan-99

Excuse me for replying to your e-mail address as well, but your problem really bothers me (and worries me a lot) and I cannot check it against any 7 or 8 database right now... :-(

As far as I know, this really implies that the dates you stored are wrong! Are you sure that the 00 does not represent 1900? And did you really not use any calculations in the select query? I would expect the order by part to be executed before any output formatting is done.

To convince me, *please* post a DESC of your table (is end_date really a date column?), and the result of a query like:

    select end_date, to_char(end_date, 'dd-mon-yyyy')     from period_setup
    order by end_date;

>Oracle support says that using the century specific date mask
>(ie. 'DD-MON-RR') will return the correct results and it really does seem to
>work.

What do you mean with "it really does seem to work"? Obviously, I expect that you used RR in the select query, but in fact I hope you used RR to insert the data. The latter would indeed make sure that 00 is stored as 2000 and would also explain the result of your query. I have seen a lot of people make mistakes when inserting date, especially by using to_date(..) to convert a *date* to a *date* -- which you should never do as internally Oracle will convert the first date to a string and back to a date, using the default date mask.

Still, I can hardly believe it. I never noticed it, which would imply that things might have changed in Oracle 8?

Arjan.
avbentem at dds.nl Received on Tue Mar 02 1999 - 11:57:38 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US