dcsimg
MM.MySQL and setting DATETIME field
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Amine_Foo
Posted On:   Monday, March 11, 2002 09:47 AM

How can one correctly set a DATETIME field on a MySQL table using

PreparedStatement.setDate(java.sql.Date)


ps.setDate(3,new java.sql.Date(new java.util.Date().getTime()));
only sets the date fields, but time is set to zeroes.

Re: MM.MySQL and setting DATETIME field

Posted By:   Anonymous  
Posted On:   Monday, March 11, 2002 10:12 AM

use the setTimeStamp method
About | Sitemap | Contact