how to store java date type to mysql date type?
See that your Date is a java.sql.Timestamp (especially if you want hours,mins,sec.. to be persisted) You could convert a java.util.Date to a Timestamp like so: new Timestamp(date.getTime())
Date
java.sql.Timestamp
java.util.Date
Timestamp
new Timestamp(date.getTime())
2.1m questions
2.1m answers
60 comments
57.0k users