Forms Date Processing


Anyone that has worked with Forms 3, 4, and 4.5 will have probably had the frustration of dealing with the restrictive date formatting options. A common application requirement is to allow users to enter dates in one format but display them in another. Forms 5 now caters for this (although the fact that it does is poorly documented).

Create the following registry entries (String values) under the key HKEY_LOCAL_MACHINE\Software\Oracle


Entry: FORMS50_USER_DATE_FORMAT
Value: MMDDRRRR (or whatever mask you want we you this for Y2K 2 digit year
entry)

Entry: FORMS50_OUTPUT_DATE_FORMAT
Value: DD-MON-YYYY (or whatever mask you want)

Entry: FORMS50_ERROR_DATE_FORMAT
Value: MMDDRRRR (or whatever mask you want we match it to the
USER_DATE_FORMAT)

The settings are automatically read by Forms and allow the following

FORMS_USER_DATE_FORMAT is the format that the user will type
FORMS_OUTPUT_DATE_FORMAT is the format that will be displayed after the user
accepts the input
FORMS_ERROR_DATE_FORMAT is the format that will display in error if the user
does not enter the right format.

This way you can keep your dates to a single text box and allow the registry settings to work.