My codes is very simple:
package callcenter;
import java.sql.*;
....
try {
String createRow= "insert into cs_applyform(id,declaretime,declarer,declarerid,troubletype,scenaro,location,worknumber) values(?,?,?,?,?,?,?,?)";
PreparedStatement pstmt=dd.conn.prepareStatement(createRow);
pstmt.setInt(1,newId);
Date now=new Date(???);
pstmt.setDate(2,now);
.......
return true ;
}
catch (Exception r) {
System.out.println("Creation failed!");
return false ;
}
I don't know what should fill in the constraction method of the object Date, i want the variable now contains the current date.
anybody help me?