Informix Error -9142: Date conversion error.
Cause and resolution
Date conversion error.
ACEGO is trying to convert from characters into a DATE data type but found an error. Either the date is not punctuated correctly, unwanted nonnumeric characters are present, or the date itself is inconsistent (for example, "01/32/91").
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9142 fires when ACEGO tries to convert a character value into a DATE data type and fails — per the official guidance.
- A date that isn't punctuated correctly, per the official guidance — the first named cause.
- Unwanted nonnumeric characters present in the value, per the official guidance — the second named cause.
- An internally inconsistent date, such as "01/32/91", per the official guidance — the third named cause.
Solutions / Resolution
- Check the source value's punctuation matches the expected date format, per the official guidance.
- Remove any unwanted nonnumeric characters, per the official guidance.
- Check the date's day/month/year values are internally consistent, per the official guidance.
Examples
An inconsistent date value
LET some_date = "01/32/91" -- -9142: day 32 doesn't exist
Corrected
LET some_date = "01/31/91"
Diagnostic Checks
- Check the source character value's punctuation, extraneous characters, and day/month/year consistency, and correct it.
Related Errors / Related Topics
- -9143 — "Character, Text, and Byte data cannot be printed with using formats." A related data-type/formatting-conversion error, on USING formats rather than DATE conversion.
A character value couldn't be converted to DATE, usually due to bad punctuation, stray characters, or an inconsistent date — correct the source value.