aspose file tools*
The moose likes JDBC and the fly likes date and time in sql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "date and time in sql" Watch "date and time in sql" New topic
Author

date and time in sql

kirupa shankari
Greenhorn

Joined: Mar 16, 2001
Posts: 8
How to get the current system time and date and store it in Ms- Access database using java.sql package?


kirupaks
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
java.util.Date d = new java.util.Date();
java.sql.Date date = new java.sql.Date(d.getTime());
preparedStatement.setDate(colNum, date);


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: date and time in sql