ORA-01810: format code appears twice. [message #57788] |
Tue, 08 July 2003 04:31 |
Devashish Rughwani
Messages: 6 Registered: November 2002
|
Junior Member |
|
|
I am trying to update a date column with
String DateStr ="to_date('"+dtSql.toString() +"',";
DateStr = DateStr+ "'YYYY-MM-DD HH24:MI:SS.mmm'"") ";
dtSql is a java.sql.Timestamp object.
I want to store the millisecond information also in the column to be updated.
But I get "ORA-01810: format code appears twice."
Could any help on the date format to use for storing milliseconds in Oracle.
Regards,
Devashish
|
|
|
Re: ORA-01810: format code appears twice. [message #57789 is a reply to message #57788] |
Tue, 08 July 2003 04:49 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
Oracle only stores up to seconds in DATES. Milliseconds can be stored in the TIMESTAMP datatype (available in Oracle 9i). You can workaround this by using a Java Stored Procedure and store the value in a VARCHAR2. Sad but true....
MHE
|
|
|