share

Wednesday, 26 August 2015

How to Convert Java Timestamp to MySQL timestamp vice versa


How to Insert java time in mysql timestamp

java.util.Date date = new Date();


Timestamp timestamp = new Timestamp(date.getTime());

preparedStatement.setTimestamp(1, timestamp);



No comments:

Post a Comment