Last active
March 31, 2017 00:53
-
-
Save darbyluv2code/5f01514ad256b26bfa54c7b902a0ea0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String sql = "INSERT INTO employees (last_name, first_name, checkout_time) values (?, ?, ?)"; | |
PreparedStatement myStmt = myConn.prepareStatement(sql); | |
... | |
java.util.Date now = new java.util.Date(); | |
java.sql.Timestamp currentTimetamp = new java.sql.Timestamp(now.getTime()); | |
myStmt.setTimestamp(3, currentTimestamp); | |
myStmt.executeUpdate(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment