Re: Is FORMS 4.5 Y2K compliant ?

From: Neville Sweet <sweet.neville.nj_at_bhp.com.au.no_junk_email>
Date: 26 Nov 1998 01:30:29 GMT
Message-ID: <01be18dc$42a47b20$483c1286_at_itwol-pc3963.itwol.bhp.com.au>


Hi Alan,

Avoid using RR in Forms 4.5 program units - the results are unpredictable. Data entry with an item format mask using RR is OK, but as Brian has pointed out, the Forms 4.5 version of PL/SQL doesn't handle RR. An alternative is to call a database-resident function. Here's a simple example:

FUNCTION convert_char_to_datetime(text_date IN VARCHAR2)

    RETURN DATE IS
  converted_date DATE;
BEGIN
  IF LENGTH(text_date) = 18
  THEN
    converted_date := TO_DATE(text_date, 'DD/MON/RR HH24:MI:SS');   ELSE
    converted_date := TO_DATE(text_date, 'DD/MON/RR HH24:MI');   END IF;
  RETURN converted_date;
END; Brian Membrey <horsemth_at_mel.switch.net.au> wrote in article <01be1851$46fdac40$1fa320cb_at_default>...
> I believe this depends on the version of 4.5 you are running. The RR
> format is not recognised by the PL/SQL available before 1.6.1 - I think
it
> just ignores RR
>
> I've found the quickest workaround is to wrire a simple function which
> checks the format mask for RR and then either uses PL/SQL conversion (if
> not RR) or performs a SQL select if the mask contains RR
>
> I have a function to do this but not right at hand - email if you would
> like a copy!
>
> Regard
> s
>
> Alan Campbell <alan_at_mullen.demon.co.uk.nospam> wrote in article
> <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.
> >
> > If I execute the same code using SQL+ it works OK.
> >
> > select TO_CHAR(TO_DATE('29-FEB-00', 'DD-MON-RR'))
> > from sys.dual
> >
> > Gives me :-
> >
> > TO_CHAR(TO_DATE('29-FEB-00','DD-MON-RR'))
> >
> >
>



> > 29-FEB-00
> >
> > Any ideas ?
> >
> > TIA
> >
> > Alan
> > ---
> > Alan Campbell
> > alan_at_mullen.demon.co.uk.nospam
> > Please remove .nospam to reply
> >
>
Received on Thu Nov 26 1998 - 02:30:29 CET

Original text of this message