I have this date string \"2013:05:12 11:41:31\"
I tried:
var strDate = \"2013:05:12 11:41:31\"; var dateParts = strDate.split(\":\"); var date = new Da
var strDate = "2013:05:12 11:41:31"; var dateParts = strDate.split(" "); dateParts = dateParts[0]; dateParts = dateParts.split(":"); var date = new Date(dateParts[0], dateParts[1] - 1, dateParts[2]); alert(date);
First get the date, then split it and then put it in the date object.