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

Home -> Community -> Usenet -> c.d.o.server -> Re: Y2K for NT and Oracle

Re: Y2K for NT and Oracle

From: Suresh Bhat <suresh.bhat_at_mitchell-energy.com>
Date: Wed, 17 Nov 1999 22:12:32 GMT
Message-ID: <01bf3158$51292fc0$a504fa80@mndnet>


Hi,

No matter which way you go, including RR format, you will face the problem, if the date falls
outside the range 1950 to 2049.

Our work around is as follows:

You need to force the users to use 4 digit year to take care of this problem at the application level be it Forms, SQL*Loader or SQL*Plus.

This is the way we have taken care of this measure in forms:

          Stop the user from entering a 2 digit year in the form.

        Set the date format mask to dd-MON-yyyy in the form, and trap the error via the following procedure in the ON-VALIDATE-FIELD trigger for the date item in the form if they try to use a 2 digit year.

      	      procedure check_date_format(pl_date in date)
		 	is
      	      BEGIN
      	      /*  **************  Reference from LIBRARY LIB_GNRL 
*************  */
      	      /*
         	      Format mask DD-MON-YYYY on date field does not work
properly.
         	      For example, date entered as 15-OCT-93 changes to
15-OCT-0093
         	      rather than 15-OCT-1993.  This error is being trapped by
this
         	      procedure check_date_format and ON-VALIDATE-FIELD trigger
or
         	      KEY-NXTFLD trigger for the date field(s).

            	 	Input parameter     pl_date= date to be checked
      	      */
      	   		if substr(to_char(pl_date,'DD-MON-YYYY'),8,2) = '00' then
         	      		message('Date must be entered in DD-MON-YYYY format,
Example
                        		01-JAN-1993.');
         	      		raise form_trigger_failure;
      	   		end if;
      	   	END;

		In your ON-VALIDATE-FIELD trigger on the date item you simply need to
call this procedure:

                               check_date_format(:block1.date1);

The procedure can be modified to accommodate appropriate date format mask used in the form such as mm/dd/yyyy etc.

Later !!!

Suresh Bhat
Oracleguru
www.oracleguru.net

avolbert_at_my-deja.com wrote in article <80uj92$g0$1_at_nnrp1.deja.com>...
> Our company is using Oracle 4.5 Forms. Since 'RR' does not work with
> PL/SQL 1.x, Oracale has given us two options. On is to use an Oracle
> programming work-around on each Forms program that has a Y2K problem.
> The other is to use a patch to use PL/SQL 2.x on the client side so
> that 'RR' can be utilized. Which of these solutions do you recommend?
> Is there any problem with utilizing 2.x? Does it mis-handle any code
> written for 1.x or does it cause processing slowdowns especially in
> peak periods?
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Received on Wed Nov 17 1999 - 16:12:32 CST

Original text of this message

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