This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JDBC and the fly likes java.util.Date to java.sql.Date Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "java.util.Date to java.sql.Date" Watch "java.util.Date to java.sql.Date" New topic
Author

java.util.Date to java.sql.Date

Lucy Smaile
Ranch Hand

Joined: Apr 17, 2002
Posts: 45
How do you convert a java.util.Date to java.sql.Date? (I presume this is what you have to do to store it with preparedStatement.setDate?)
Thanks
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

Originally posted by Lucy Smaile:
How do you convert a java.util.Date to java.sql.Date? (I presume this is what you have to do to store it with preparedStatement.setDate?)
Thanks

Lucy Smaile
Ranch Hand

Joined: Apr 17, 2002
Posts: 45
Thanks v much!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: java.util.Date to java.sql.Date
 
Similar Threads
comparing date fields from a database
Converting Date between Java and DB
Database Insert With java.util.Date
not all variables bound Error
Using CacheRowset