ORA-01843: not a valid month
OracleWhat does it mean?
While converting text to a DATE, the month part could not be interpreted as a valid month. Usually the date format does not match the format of the data.
Why does it happen?
No format mask passed to TO_DATE and the session's NLS_DATE_FORMAT does not match the data; day and month swapped (DD/MM vs MM/DD confusion); a language/locale difference (in month names); corrupted or unexpected date text.
How to fix it
Always pass an explicit format in TO_DATE calls: TO_DATE('2026-07-04', 'YYYY-MM-DD'). For text containing month names, specify the language: TO_DATE(str, 'DD-MON-YYYY', 'NLS_DATE_LANGUAGE=ENGLISH'). Set the session format if needed: ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD'. Validate invalid date text before loading.
More from this engine
- ORA-12899value too large for column
- ORA-30926unable to get a stable set of rows in the source tables
- ORA-08103object no longer exists
- ORA-14400inserted partition key does not map to any partition
- ORA-01536space quota exceeded for tablespace
- direct path readWait: session reading blocks directly into PGA bypassing buffer cache
- latch: cache buffers chainsWait: contention on cache buffers chains latch