I have a date and time with the following value: 2017-01-27_12-52-00-9370 What I need is to insert it into the database with the DATETIME data type Thanks.
I have a date and time with the following value: 2017-01-27_12-52-00-9370 What I need is to insert it into the database with the DATETIME data type Thanks.
Use java.sql.Timestamp
to be able to save the date more accurately:
java.util.Date date = new Date(); //Tu fecha a guardar
tuPreparedStatement.setTimestamp(columIndex, new java.sql.Timestamp(date.getTime()));