DATE1

This function formats alphanumeric date data.

The DATE1 function has a length limitation of 19 digits. If the value of the length of the DATE1 field is over 19 digits, the operational server truncates the input value to the first 19 digits of the value.

Output Type
numeric
Fldargs
dateval
MinFldArgs, MaxFldArgs
1,1
Number of standard roles
1
Stranon table
DATE
  1. This function first takes the input and extracts all the digits. All alphabetic characters are removed.
  2. The length of this date value is then checked. If the length is 0, the value is treated as ANON. If the length is greater than 8, then the value is truncated to the first 8 digits.
  3. The value is then checked to see that it does not convert to an invalid date (for example, if the year is less than 1 or greater than 9999, or if the month is not between 1 and 12).
  4. If step 3 fails, the attribute is treated as ANON.
  5. If there is an ANON table specified in mpi_dvdxstd, then the corresponding table is checked for this attribute value. If found in the ANON table, the attribute is treated as ANON.

A date value of 1971-23-01 or 23-01-1971 or 01/23/1971 is converted to 19710123.