title: google app script insert date to table using jdbc
body: <p>I am trying to insert a date in one of my Oracle table, I tried use setTimestamp, setDate and even setObject but none of these methods work. Anyone know what is the correct way to insert date value?</p>
  
  <pre><code>var stmt = conn.prepareStatement("insert into blob_table (filename,blob_field,date_insert) values (?,?,?)");
  var date_insert=new Date();
  
  stmt.setString(1, mess.getAttachments()[0].getName());
  stmt.setBytes(2, mess.getAttachments()[0].getBytes());
  //stmt.setTimestamp(3,(JdbcTimestamp)date_insert.getTime);
  stmt.setObject(3, date_insert);
  //stmt.setDate(3,date_insert.getDate() );
  </code></pre>