Hi I'm currently trying to convert a java date type to a Oracle date type to update database information. I have created the code and it works perfect on SQL server 2000 (via an JDBC:ODBC connection) but encounters errors when I connect to an oracle 8 database. The code is as follows:
Date dtDate = new Date(System.currentTimeMillis ());
strSQL = "insert into message (run_Number, message_Date) values (" + Long.toString (runNumber) + " , '" + dtDate.toLocaleString() + "')";
I'm getting the following error message from oracle.:
java.sql.Exception: ORA-01830: date format picture ends before converting entire input string
What am I doing wrong..? Do I have to convert the value in a different form?