June 26, 2009 at 1:15 PM
Use Prepared Statement to insert all the data.Prepared Statement is having the method setTimestamp() that will insert date with time into database. So to use this method, you have to insert all the field using Prepared Statement.
First of all create an object of java.sql.Timestamp class and then use the Prepared Statement like this:
java.sql.Timestamp sqlDate = new java.sql.Timestamp(new java.util.Date().getTime());
Hope that it will help you.