0

I get an error in a INSERT. The problem is in this line:

to_date('05-JUN-13 01.09.10.000000 PM','DD-MON-YY HH.MI.SS.FF') 

I don't know how resolve it. I tried also with

to_timestamp('05-JUN-13 01.09.10.000000 PM','DD-MON-YY HH.MI.SS.FF')

But i had this error:

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

Any helps? Thanks a lot

Atlas91
  • 5,754
  • 17
  • 69
  • 141

1 Answers1

3

The AM/PM format is missing, therefore the "date format picture" (what a wonderful name!) ends too early. Just use

to_timestamp('05-JUN-13 01.09.10.000000 PM', 'DD-MON-YY HH.MI.SS.FF6 AM')

wolφi
  • 8,091
  • 2
  • 35
  • 64
  • Perfect but now i get this one: `ORA-01502: index 'My_tab' or` `partition of such index is in unusable state` – Atlas91 Jun 11 '13 at 15:29
  • 1
    If you get the 'index unusable' error, the index needs to be rebuild. I am not too clear why you get the error. Can you post your statement? – wolφi Jun 12 '13 at 11:38
  • I apologize for my delay in answering. However now everything goes well thank you :) – Atlas91 Jun 13 '13 at 09:30