Re: SQL*Forms and the 21st Century
Date: 1995/07/03
Message-ID: <DVANDERR.95Jul3125953_at_hen3ry.oracle.com>#1/1
In article <DB07FJ.AJ1_at_CSUFresno.EDU> stevec_at_zimmer.CSUFresno.EDU (Steve Cosner) writes:
>In article <3svdmp$nek_at_mccoy.ici.net> jack_at_ici.net (Jack Bell) writes:
>>Greetings Oracle users!
>>
>>As the 21st Century approaches a problem has surfaced with some
>>SQL*Forms 3.0 data input forms I created. It involves the
>>evaluation of dates which occur beyond 31-DEC-1999. The forms
>>use the default DD-MON-YY format for date display. Users
>>noticed that dates entered with 00 for the year were always
>>evaluated as occuring in 1900. To correct this I made an
>>on-validate-field trigger as follows:
>>
>> if :date_field < '01-JAN-50' then
>> :date_field := add_months(:date_field,1200);
>> end if;
>>
>>It did not solve the problem, the dates were still evaluated in
>>the wrong century! I seem to remember reading that fields were
>>treated as character data until convertion at insert time. I
>>suspect that this is the reason the first 2 digits of the year
>>never get corrected by the trigger, since they are not included
>>in the form's field. I realize that there are alternative
>>solutions to this such as on-insert/on-update triggers, but ....
>>
>>
>>Has anyone got a simple solution which keeps the current field
>>format?
try investigating the new Oracle date format mask 'RR'
-- This opinion will self destruct in 5 seconds. Danny van der Rijn--dvanderr_at_oracle.com || Take my advice --- || *I'm* certainly not using it. (415) 506-3142 ||Received on Mon Jul 03 1995 - 00:00:00 CEST