title: how to parse a datetime in javascript / jquery?
body: <p>How can I parse the following string :</p>
  
  <pre><code> 02/16/2015 10:51 PM
  </code></pre>
  
  <p>into this</p>
  
  <pre><code> 2015-02-16 22:51
  </code></pre>
  
  <p>The reason I want to do this is because mysql is returning an error if I try to enter the first one with the following code : </p>
  
  <pre><code>&lt;script&gt;
  
  var d = Date.parse("02/16/2015 10:51 PM");
  alert(d); // 1424123460000
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Tried with both TIMESTAMP and DATETIME column types. Any help ?</p>