Multiple date input formats for QUICK
James B. Byrne
byrnejb at harte-lyne.ca
Thu Dec 8 12:02:15 CST 2022
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?
--
*** e-Mail is NOT a SECURE channel ***
Do NOT transmit sensitive data via e-Mail
Unencrypted messages have no legal claim to privacy
Do NOT open attachments nor follow links sent by e-Mail
James B. Byrne mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
More information about the powerh-l
mailing list