Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Date format with java

Re: Date format with java

From: Peter Sylvester <peters_at_mitre.org>
Date: Mon, 09 Apr 2007 08:01:54 -0400
Message-ID: <461A2B32.4030105@mitre.org>


I can't help on the ORA-01858 error, but I would generally bind a Java java.sql.timestamp field to an Oracle date or timestamp column, which eliminates any character conversion issues completely.

This would be done using using the PreparedStatement.setTimestamp() for input and ResultSet.getTimestamp() for output. There is also an optional Calendar argument that you can pass to take care of local/system time conversions, which is usually a good idea to use.

--Peter

--

http://www.freelists.org/webpage/oracle-l Received on Mon Apr 09 2007 - 07:01:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US