I have a field in my database (MYSQL) with datetime type (with this format 2011-05-18 16:29:31), I dont know this type! because I Have to convert a String to this type.
I have found java.sql.Date and java.sql.Timestamp and not datetime!
I have a field in my database (MYSQL) with datetime type (with this format
Share
mysql
datetimemaps to ajava.sql.Timestamp– they are both a “date plus a time”To convert a String to a Date, use this code: