Learn the cause and how to resolve the ORA-01830 error message in Oracle.
When you encounter an ORA-01830 error, the following error message will appear:
- ORA-01830: date format picture ends before converting entire input string
Cause of Error
You tried to enter a date value, but the date entered did not match the date format.
How to Resolve the Error
The option(s) to resolve this Oracle error are:
This error can occur when you try to enter a date value without using the TO_DATE function.
In Oracle, the default date format is generally DD-MON-YYYY. If you try to enter a date value that does not comply with this format, you need to use the TO_DATE function.
For example, if you tried to execute the following SQL statement:
INSERT INTO supplier VALUES (1, 'IBM', '13-DEC-2004 6:56 PM');
You would receive the following error message:
To correct this error, you can use the TO_DATE function as follows:
INSERT INTO supplier VALUES (1, 'IBM', TO_DATE('13-DEC-2004 6:56 PM', 'dd-mon-yyyy hh:mi PM'));