How can I parse the following string :
02/16/2015 10:51 PM
into this
2015-02-16 22:51
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 :
<script>
var d = Date.parse("02/16/2015 10:51 PM");
alert(d); // 1424123460000
</script>
Tried with both TIMESTAMP and DATETIME column types. Any help ?