debugMinor
Which picture does the ORA-01830 error message refer to?
Viewed 0 times
referpicturetheerror01830messageoradoeswhich
Problem
ORA-01830: date format picture ends before converting entire input string
About the error message.
I am confused. Which picture is the error message talking about? All I provided was a date.
About the error message.
I am confused. Which picture is the error message talking about? All I provided was a date.
Solution
The "format picture" refers to the format mask. If you are doing an explicit conversion using the
i.e.
In this case, the format picture is the "YYYY-MM-DD". This expression raises the ORA-01830 error because the input string contains more data than the format picture is capable of handling.
If, on the other hand, you are doing an implicit conversion, the format picture refer's to the session's
TO_DATE function, the format picture is the second argumentto_date( input_string, format_picture )i.e.
to_date( '2011-01-01 01:23:45', 'YYYY-MM-DD' )In this case, the format picture is the "YYYY-MM-DD". This expression raises the ORA-01830 error because the input string contains more data than the format picture is capable of handling.
If, on the other hand, you are doing an implicit conversion, the format picture refer's to the session's
NLS_DATE_FORMAT which Oracle uses in its own implicit TO_DATE call.Code Snippets
to_date( input_string, format_picture )to_date( '2011-01-01 01:23:45', 'YYYY-MM-DD' )Context
StackExchange Database Administrators Q#4931, answer score: 5
Revisions (0)
No revisions yet.