Re: Format dates in Forms 4.0

From: Steven P. Muench <smuench_at_oracle.com>
Date: 26 Oct 1994 02:47:42 GMT
Message-ID: <SMUENCH.94Oct25194742_at_doh.oracle.com>


You can see that this is not a Forms-specific change if you try the following at the SQLPLUS command prompt:

        SELECT TO_CHAR(TO_DATE('01011994','DD/MM/YYYY'),'DD/MM/YYYY')          
          FROM DUAL;                                                           

        In V6, this produces:                                                  

--------------------
01/01/1994 In V7, this produces:
--------------------
01/11/0094

Forms 4.0 uses exactly the same generic routines that the Oracle7 database uses to format dates. While it doesn't bring back the old behavior, using the "FX" format mask element prevents invalid data from being entered:

        SELECT TO_CHAR(TO_DATE('01011994','FXDD/MM/YYYY'),'DD/MM/YYYY')        
          FROM DUAL;                                                           

ERROR: ORA-01861: literal does not match format string

Which in the context of Forms 4.0 will prevent the user from proceeding until a valid date is entered. The same "FX" element can be used as part of your "Format Mask" in Forms for the date Text Item in question.

--

Steve Muench         Email: smuench_at_oracle.com
Forms Development      CIS: 73404,676
Product Manager
Oracle Corporation
Received on Wed Oct 26 1994 - 03:47:42 CET

Original text of this message