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?
Jack
Received on Thu Jun 29 1995 - 00:00:00 CEST