Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

date and time in sql

 
kirupa shankari
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get the current system time and date and store it in Ms- Access database using java.sql package?
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.util.Date d = new java.util.Date();
java.sql.Date date = new java.sql.Date(d.getTime());
preparedStatement.setDate(colNum, date);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic