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);

Leave a Reply

Your email address will not be published. Required fields are marked *

90 − = 89