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: TO_DATE in Forms 4.5: Y2K Bug

Re: TO_DATE in Forms 4.5: Y2K Bug

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1997/10/21
Message-ID: <877458170.15746@dejanews.com>#1/1

In article <344ABF73.6F84_at_erols.com>,
  ALIF_at_erols.com wrote:
>
> In Forms 4.5 ( for Developer /2000, v1.3.2 ), the TO_DATE function
> does not convert DD-MON-RR correctly. For example,
>
> vdate := TO_DATE( :blk.date_field, 'DD-MON-RR' );
>
> if :blk.date_field is 01-JAN-2000
> then vdate becomes 01-JAN-1900.
>
> A work-around for this is to do a 'select to_date() from dual'.
>
> A forms basetable field having the 'RR' format gets updated correctly,
> but a conversion with TO_DATE is incorrect.
>
> Does anyone know of a bug fix for this??
>
> Thanks in advance,
> Farah [ Please e-mail at alif1_at_tksrv16.usps.gov ]

So don't use the RR format in a to_date pl/sql command. (I am appalled that it doesn't work.) I guess we just use the RR mask on input items, and never tried it in pl/sql.

We have a work-around that we developed using Forms 3, before the RR format mask was available. It is a function that takes the 2-digit year and returns the century based on a sliding century, so it will work forever. Ours converts dates 10 years in the future and 89 years in the past-- 07 converts to 2007, while 08 converts to 1908. (Next year it becomes 1909 to 2008) But you can change it to anything you want.

I've posted it in the past: Look it up in www.dejanews.com, on my article: Title: Forms4.5: mm/dd/yyyy date format default Date: 1997/07/21 (Just use their "search filter")

(I can email it if you can't find it).

Steve Cosner

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Tue Oct 21 1997 - 00:00:00 CDT

Original text of this message

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