I am using Spring JDBC template for jdbc operations.
Since I am using BeanPropertySqlParameterSource, the bean’s START_TIME variables is assigned with java.sql.date type.
in Oracle db, the column is mentioned as “DATE” type (and don’t have TIMESTAMP type, even the db is 10.2 ver)
Now when I set
bean.setStartTime(new Date(System.currentTime())
it’s storing with date and time stamp as 00:00:00
Please tell me how can i Store the time stamp also.
You need to use
java.sql.Timestampjava.sql.Dateremoves the time partFrom the Javadocs: