Answers for "convert string to datetime javascript"

13

js string to date

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

var str = "2013/1/16";
var strToDate = new Date(str);
Posted by: Guest on March-29-2020
1

convert string to datetime javascript

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)
Posted by: Guest on May-05-2020

Code answers related to "convert string to datetime javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language