var newTime = "1999-11-11"; var str=newTime.toString(); d = str.replace(/-/g,"/"); var date = new Date(d);