title: how to fix error when inserting DATETIME into db
body: <p>I am trying to to do this:</p>
  
  <pre><code>pr.setStartdate("2006-09-10T00:00:00");
  </code></pre>
  
  <p>I am getting this error:</p>
  
  <pre><code>java.sql.SQLDataException: The syntax of the string representation of a datetime value is incorrect.
  </code></pre>
  
  <p>any ideas on how to successfully insert would be great. </p>
  
  <p>here is a little more code. 
  now do i need to setDate? or does setString work for begintime, endtime, and date? they are all DATETIME objects:</p>
  
  <pre><code>PreparedStatement pstmt = conn.prepareStatement("UPDATE Event SET date=?, begintime=?, endtime=?, status=?, productionid=?, conceptual_packageid=? WHERE id=?");
          pstmt.setString(1, pkg.getDate());
          pstmt.setString(2, pkg.getBeginTime());
          pstmt.setString(3, pkg.getEndTime());
          pstmt.setString(4, pkg.getStatus());
          pstmt.setString(5, pkg.getProductionID());
          pstmt.setString(6, pkg.getConceptual_PackageID());
          pstmt.setString(7, pkg.getId());
  
          pstmt.executeUpdate();
          pstmt.close();
  </code></pre>