Re: forms3 dates<6 digits

From: Christian Mondrup <reccmo_at_unidhp1.uni-c.dk>
Date: 1995/07/01
Message-ID: <3t3t7f$kea_at_news.uni-c.dk>#1/1


Steve Cosner (stevec_at_zimmer.CSUFresno.EDU) wrote:
: In article <3t1l50$esk_at_nexus.uiowa.edu> DOUGLAS-KELLEY_at_UIOWA.EDU writes:
: >I'm interested if any one has a way to handle entering
: >a date into a date field in forms 3.0 with less than 6
: >digits. For example for Jan 12,1995 I would like to have
: >the user enter 11295 and have it go in as 01-12-95.
: >I have a format mask set to MM-DD-YY but if 11295 is
: >entered it comes out 11-29-05 and since this is a valid
: >date no error occurs.
: >
: >If there is no way to get the date to go in correctly,
: >is there a way to force the user to enter 011295, or
: >flash a message if they enter less than 6 digits.
: >
 

: Change it to char format, and write an on-validate-field trigger to
: take the text string and re-format it, and re-display it.
 

: This will probable require a hidden field where the real date is
: "selected into" and "updated from" by the form.

You don't need to use a hidden field. In the sql*forms editor set the field type to DATE, the field length to 6 and the Format Mask attribute to what you want, eg. mmddyy. In the .inp file the format mask attribute is represented as 2 lines:

INPUT_MASK = mmddyy
OUTPUT_MASK = mmddyy

: This one will keep you busy for a while.
 

: Also watch out what happens in January, 2000. Forms defaults the
: century to the century of the client PC in 2-digit years.

This warning still applies !!

--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+      Christian Mondrup                                                      +
+      UNI-C Aarhus, Danish Computing Centre for Research and Education.      +
+      Olof Palmes Alle 38, DK 8200 Aarhus N.                                 +
+                                                                             +
+      Phone:   +45 86 78 44 44                                               +
+      Telefax: +45 86 78 44 55                                               +
+      E-Mail:  Christian.Mondrup_at_uni-c.dk                                    +
+                                                                             +
+      Opinions expressed are mine and do not reflect those of my employer.   +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Received on Sat Jul 01 1995 - 00:00:00 CEST

Original text of this message