Convert Timestamp to java.util.date
843854Apr 19 2005 — edited Apr 19 2005I'm storing a java.util.Date in a Timestamp field in Oracle since the java.sql.Date drops the time data. I succesfully covert from java.sql.Date to Timestamp with:
new Timestamp(trans.getTransDate().getTime());
but when I get the Timestamp back from Oracle I can't figure out how to get it back to a java.util.Date. I see in the API under Timestamp that there's a toString method that returns the date in JDBC timestamp escape format. What I can't figure out is how to convert that to a java.util.Date.
Can someone help me?