ORA-01841: (full) year must be between -4713 and +9999, and not be 0

    You are trying to convert a string into a date, but the year is incorrectly specified. It cannot be 0 or outside the -4713..9999 range.

    eg:


    SQL> select to_date('00001231', 'YYYYMMDD') from dual;
    select to_date('00001231', 'YYYYMMDD') from dual
    *
    ERROR at line 1:
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0


    SQL> select to_date('-47141231', 'YYYYMMDD') from dual;
    select to_date('-47141231', 'YYYYMMDD') from dual
    *
    ERROR at line 1:
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0


    SQL> select to_date('20061231', 'YYYYMMDD') from dual;

    TO_DATE('
    ---------
    31-DEC-06



Commercial
Forum Messages
No messages
Add your message for ORA-01841
Name:email:
Validation Code:v7brkpbd8e3tc76nt
Enter Code above:
Title:
State your problem: