Re: Is FORMS 4.5 Y2K compliant ?

From: Grinberg L. <leon_at_grant.kharkov.ua>
Date: Sat, 28 Nov 1998 15:14:18 +0200
Message-ID: <73osq5$23c_at_grant.grant.UUCP>


Alan Campbell wrote in message <365aad66.709976_at_news.demon.co.uk>...
>If I execute the follwoing code using FORMS 4.5 I get the error
>ORA-01839 which is telling me that the day part of the date is not
>valid for the month (the current system date is 29th February 2000).
>
>Current_Date := TO_CHAR(SYSDATE);
>
>MESSAGE(TO_CHAR(TO_DATE(Current_Date, 'DD-MON-RR')));
>
>Current date gets set to 20-FEB-00. the second line causes the error
>mentioned above.

It's feature of Forms PL/SQL (we have PL/SQL Version 1.2.1.5.0) I try to continue your experiment: eliminate reference to SYSDATE and directly set date to 28th February 2000. I have got a big surpirse!

declare
  d1 date := to_date('28-FEB-2000','DD-MON-YYYY');   d2 date;
begin
  d2 := TO_DATE(to_char(d1,'DD-MON-YY'),'DD-MON-RR');   message(TO_CHAR(d2,'DD-MON-YYYY'));
end;

Message is '29-FEB-1998' !

                                 ^^^

That's why you have error. There is no 29th February in 1998! I suggest that PL/SQL 1.2 can't proceed format RR and substitute year from sysdate (but what is SYSDATE in your example?).

But at the same time RR in item properties works fine.

Good luck,

 Leon Grinberg. leon_at_grant.kharkov.ua Received on Sat Nov 28 1998 - 14:14:18 CET

Original text of this message