Re: DATE field questions - Forms 3.0/4.0

From: Darin R. Brown <drbrown_at_us.oracle.com>
Date: 5 Nov 1994 05:44:40 GMT
Message-ID: <39f648$ef4_at_dcsun4.us.oracle.com>


kiva_at_xmission.xmission.com (KIVA) writes:

>We are looking for elegant ways to accomplish entry of dates into Oracle DATE
>fields in different formats: 3/31/94, 3.31.94, 31-3-94. We have created user
>exits in the past for allowing the user to enter the date in any of the above
>formats and translating that to the standard Oracle notation DD-MMM-YY. Does
>the Oracle have anything that would allow me to do the same without using an
>user exit?
>
>Risto Tolonen
>KIVA
>risto_at_kiva.com
>

One way to do this is to have the date fields as non-base table character fields in your form. When the user enters a value, the validate trigger could call a PL/SQL procedure to validate that the date is in one of the valid formats. Assuming the date is okay, convert it into the hidden base table date field. You would have to populate the display field when the user queries a record. Unfortunately, when the user re-queries the record the date will appear in some pre-defined format (possibly different than the format they entered it in).

Darin Brown
Oracle Commercial Consulting Received on Sat Nov 05 1994 - 06:44:40 CET

Original text of this message