title: Formatting dates for Insert into MYSQL with Node.js
body: <p>I am inserting data into MYSQL from node.js using node-mysql. I can insert data correctly via a MYSQL stored procedure call in Node except that my dates are always inserting as 0000-00-00 00:00:00</p>
  
  <p>The date strings I am trying to insert are in the format: dd/mm/yyyy hh:mm:ss</p>
  
  <p>I'm assuming I need to correctly format my dates in Node.js to insert?</p>
  
  <pre><code>connection.query('CALL sp_InsertUpdateOffer(' + NetworkID + ',"' + data["Promotion ID"] + '",' + data["Advertiser ID"] + ',"' + DataCleanUp(data.Description) + '",null,"' + DataCleanUp(data.Categories) + '","' + DataCleanUp(data.Code) + '","' + DataCleanUp(data.Terms.substring(0, 1000)) + '","' + data.Starts + '","' + data.Ends + '","' + DataCleanUp(data["Deeplink Tracking"]) + '","' + DataCleanUp(data.Deeplink) + '","' + DataCleanUp(data.Advertiser) + '")', function (err, rows, fields) {
  });
  </code></pre>
  
  <p>Thanks</p>