Multiple date input formats for QUICK
RUTMJVA
tmjva23664 at gmail.com
Thu Dec 8 12:15:13 CST 2022
If this is quick, my guess this is also a screen.
Don't give users ideas. Give them 3 defined fields: yyyy, mm, and dd
Then separate the fields with a character of the programmer's choice.
They won't be able to touch that character, either dots, dashes, or
slashes, they are simply displayed between fields.
Then behind the scenes, concatenate the three fields together into a new
field to make a date.
On 12/8/22 13:02, James B. Byrne wrote:
> PH839
>
> I have a request to allow users to input dates as in any of the following forms:
> yyyymmdd
> yyyy.mm.dd
> yyyy-mm-dd
> yyyy/mm/dd
>
> To handle this I tried the following:
>
> FIELD INPUT-DATE OF TRANSACTIONS
>
> PROCEDURE INPUT INPUT-DATE
> BEGIN
> LET QKT-TEXT=TRUNCATE(LJ(FIELDTEXT))
> IF MATCHPATTERN(QKT-TEXT,"####.##.##") OR &
> MATCHPATTERN(QKT-TEXT,"####-##-##") OR &
> MATCHPATTERN(QKT-TEXT,"####/##/##")
> THEN LET FIELDTEXT = QKT-TEXT[1:4]+QKT-TEXT[6:2]+QKT-TEXT[9:2]
> END
>
> Which does not work. If yyyy.mm.dd is input then the error " This entry must
> be a date." appears. I speculate that this means that the FIELDVALUE is not
> being changed as a result of manipulating FIELDTEXT.
>
> SO, is there any way to implement this feature and if so then what is it?
>
--
Tracy Johnson
BT
NNNN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sowder.com/pipermail/powerh-l/attachments/20221208/37a6ac27/attachment.html>
More information about the powerh-l
mailing list