// Oracle error reference

ORA-01830: date format picture ends before end of input

The string being converted to a date has more characters than the format model describes, typically a time part the format leaves out.

Error code
ORA-01830
Category
Data values and conversion
Error message
date format picture ends before converting entire input string

What it means

ORA-01830 means Oracle finished applying the format model while there was still input left, for example converting '2026-11-09 14:30:00' with 'YYYY-MM-DD'.

Common causes

  • A timestamp string converted with a date-only format.
  • Implicit conversion of a string with a time part, using an NLS_DATE_FORMAT without one.
  • Fractional seconds passed to TO_DATE, which doesn't support them.

How to fix it

  1. Include every part of the string in the format.

    SELECT TO_DATE('2026-11-09 14:30:00', 'YYYY-MM-DD HH24:MI:SS') FROM dual;
  2. Use TO_TIMESTAMP for fractional seconds.

    SELECT TO_TIMESTAMP('2026-11-09 14:30:00.123', 'YYYY-MM-DD HH24:MI:SS.FF3') 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.