Informix Error -79786: Unable to build a Date object based on localized date string representation.
Cause and resolution
Unable to build a Date object based on localized date string representation.
The localized date string representation specified in a CHAR, VARCHAR, or LVARCHAR column is not correct, and a date object cannot be built based on the year, month, and day values.
Verify that the date string representation conforms to the DBDATE or GL_DATE date formats if either one of these is specified in a connection database URL string or property list. If neither DBDATE or GL_DATE is specified but a CLIENT_LOCALE or DB_LOCALE is explicitly set in a connection database URL string or property list, verify that the date string representation conforms to the JDK short default format (DateFormat.SHORT).
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-79786 fires when a localized date string in a CHAR/VARCHAR/LVARCHAR column can't
be parsed into a Date object — per the official guidance.
- A localized date string not conforming to the
DBDATE/GL_DATEformat, per the official guidance — the first named case, when either is set in the connection URL or property list. - A localized date string not conforming to the JDK short default format
(
DateFormat.SHORT), per the official guidance — the second named case, when neitherDBDATE/GL_DATEis set butCLIENT_LOCALE/DB_LOCALEis.
Solutions / Resolution
- Verify the date string matches
DBDATE/GL_DATEif either is configured, per the official guidance. - Otherwise verify it matches
DateFormat.SHORTifCLIENT_LOCALE/DB_LOCALEis set, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond a malformed localized date string.
Diagnostic Checks
- Check which of
DBDATE/GL_DATE/CLIENT_LOCALE/DB_LOCALEis configured, and verify the date string matches the applicable format.
Related Errors / Related Topics
- -79785 — "Unable to convert JDBC escape format date string to localized date string." A related date-conversion error, on a JDBC escape-format string rather than a localized string stored in a character column.
A localized date string in a character column couldn't be parsed — check it against
DBDATE/GL_DATE or the JDK short format.