CDW055
This routine is used to validate and format a date field entered on a web form.
Calling Format:
CALL "CDW055", DIN$, D$[ALL]
You do not need to pre-dimension D$[ ] before calling.
CDS055 |
---|
DIN$ |
the input date to be converted, as entered by the user.
Can be in any of the following formats:
Slashes not entered: 2 characters: MD, assumes current year 3 characters: MDD, assumes current year 4 characters: MMDD, assumes current year 5 characters: MDDYY 6 characters: MMDDYY 8 characters: MMDDYYYY Slashes, back-slashes, hyphens, or periods entered as separators: M/D, assumes current year MM/D, assumes current year MM/DD, assumes current year when two slashes are entered, any format that includes 1 or 2 digit month, 1 or two digit day, 2 or 4 digit year in m/d/y format. |
D$[ ] |
Each element in the D$[ ] string array will be set to the date formatted as listed below.
D$[0] | MM/DD/YY | D$[1] | YYMMDD | D$[2] | Julian (7 digits) | D$[3] | Day of week - long: Monday | D$[4] | Day of week - short: Mon | D$[5] | Display format - long: May 3, 1990 | D$[6] | MAS90 format which is a modified YYMMDD where YY is coded to permit years beyond 2000. 1996 for example is represented by "?," | D$[7] | Microsoft serial number date masked with ###### where 1 is 1/1/1900 | D$[8] | Safeguard format of YYYYMMDD packed into 4 characters using PCK() | D$[9] | NCDS format of YYYYMMDD |
|
If the date entered is invalid, then each element of the D$[] array will be null.