John Topley's KnowledgebaseRetaining The Time Component When Assigning A SQL Date To A Java DateWednesday, 05 May 2004When retrieving a java.sql.Date object—representing the contents of a database date column—using the JDBC ResultSet's getDate method, assigning the retrieved value to a java.util.Date object causes the time component to be lost i.e. it gets set to 00:00:00. The code given below shows how to retain the time component. “rset” is a variable of type java.sql.ResultSet. java.util.Date dateUpdated |
![]() |

