convert string to datetime javascript

JavaScript
var myDate = new Date("2013/1/16");

var str = "2013/1/16";
var strToDate = new Date(str);var s = '01-01-1970 00:03:44';
var d = new Date(s);
console.log(d); // ---> Thu Jan 01 1970 00:03:44 GMT-0500 (Eastern Standard Time)
Source

Also in JavaScript: