title: timestamp insert to sql is giving me error
body: <p>timestamp insert to sql is giving me error :</p>
  
  <p>SQLException: Data truncation: Incorrect datetime value: '' for column 'Date' at row 1
  SQLState: 22001
  VendorError: 0</p>
  
  <p>~~~~~~~~~~~~~~~~~~this is how it looks like in java:~~~~~~~~~~~~~~~~~~</p>
  
  <pre><code>String sql = "INSERT into complaint (ComplaintID,Date) VALUES" + "(?,?)";   
  GetCurrentTimeStamp stamp = new GetCurrentTimeStamp();  
  PreparedStatement rss = con.prepareStatement(sql);
  rss.setInt(1,newComplaint.getComplaintID());
  rss.setTimestamp(2,stamp.getTimeStamp());
  newComplaint.setMsgResponse(MessageManager.msgResponse.SUCCESS);
  rss.executeUpdate();
  </code></pre>
  
  <p>~~~~~~~~~~~~~~~~~~this is GetCurrentTimeStamp class:~~~~~~~~~~~~~~~~~~</p>
  
  <pre><code>import java.sql.Timestamp;
  import java.util.Date;
  
  
  
  public class GetCurrentTimeStamp 
  {
      private  java.util.Date date= new java.util.Date();
  
      public Timestamp getTimeStamp(){
      return new java.sql.Timestamp(date.getTime());
      }
  }
  </code></pre>
  
  <p>~~~~~~~~~~~~~~~~~~this is the Mysql code:~~~~~~~~~~~~~~~~~~</p>
  
  <pre><code>CREATE TABLE `complaint`
   (
    `ComplaintID` int(11) NOT NULL AUTO_INCREMENT,
  
    `Date` timestamp NULL DEFAULT NULL,
  
    PRIMARY KEY (`ComplaintID`)
  ) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p>
  
  <p>please help!!!! thanks!!</p>