hi every body , i have some trouble, please help and hitn me solve this,thanks!


First : I can use method setDate() of prepareStatement
this is my code: java.util.Date date = new java.util.Date();
java.sql.Date sqlDate = new java.sql.Date(date.getTime());
preStatement.setDate(sqlDate);



Second : When i use this code :
java.util.Date date = new java.util.Date();
java.sql.Date sqlDate = new java.sql.Date(date.getTime());
String str = sqlDate.toString();
preStatement.setDate(str);
In database will have record like this : Sep 18 2008 12:00 AM
It's always 12:00 AM (Month, Day, year are right, only the time make me mad , it cannot get the current time)


Thanks for read my post!