var psrseDate = Date.parse("2010-03-15 10:30:00"); console.log(psrseDate ) // output "Invalid Date" var psrseDate = Date.parse("2010/03/15 10:30:00");console.log(psrseDate ) // output "Invalid Date"
var arr = "2010-03-15 10:30:00".split(/[- :]/), date = new Date(arr[0], arr[1]-1, arr[2], arr[3], arr[4], arr[5]); console.log(date);// Mon Mar 15 2010 10:30:00 GMT+0000 (GMT Standard Time)