Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

The "format picture" refers to the format mask. If you are doing an explicit conversion using the TO_DATE function, the format picture is the second argument

to_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.

share|improve this answer
add comment

This means that you have provided more than just a date. Perhaps an extra space, or you have provided a time but are asking it to format just a date.

05/06/2009 11:08:49 PM

alter session set nls_date_format='DD/MM/YYYY';

sqlldr . . .

ORA-01830 date format picture ends before converting entire input string

share|improve this answer
    
yes, I understand the problem, but what does format picture refer to? –  Lazer Aug 22 '11 at 20:35
    
"DD/MM/YYYY" is the format picture in the sample. –  mrdenny Aug 22 '11 at 21:22
    
I prefer to use alter session set nls_date_format = 'yyyy-mm-dd hh24:mi:ss' –  bernd_k Aug 23 '11 at 4:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.