// Oracle error reference

ORA-01843: not a valid month

A string converted to a date has a month Oracle doesn't accept for the format in use, often because the session's NLS_DATE_FORMAT or language differs from the data.

Error code
ORA-01843
Category
Data values and conversion
Error message
not a valid month

What it means

ORA-01843 means the month part of a date string didn't match the format model. Without an explicit format, TO_DATE and implicit conversions use the session's NLS_DATE_FORMAT and NLS_DATE_LANGUAGE, so the same SQL can work for one user and fail for another.

Newer releases word it as An invalid month was specified.

Common causes

  • Relying on implicit conversion: WHERE order_date = '2026-11-09' with a session format of DD-MON-RR.
  • Day and month swapped between formats such as MM/DD and DD/MM.
  • Month names in a language other than the session's NLS_DATE_LANGUAGE.

How to fix it

  1. Always give an explicit format, or use an ANSI date literal.

    SELECT * FROM orders WHERE order_date >= DATE '2026-11-09';
    SELECT TO_DATE('09/11/2026', 'DD/MM/YYYY') FROM dual;
  2. Pin the language for month names when needed.

    SELECT TO_DATE('09-NOV-2026', 'DD-MON-YYYY', 'NLS_DATE_LANGUAGE=ENGLISH') FROM dual;

Related errors

More data values and conversion errors

The code and message text are from the Oracle Database Error Help. Browse the full Oracle error list or search every database error.

// fewer errors, faster fixes

Work on Oracle in SQLly

A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for Oracle and the other databases you use.