format time to date js code example
Example 1: javascript date parse yyyy-mm-dd
var dateString = "10/23/2015"; // Oct 23
var dateObject = new Date(dateString);
document.body.innerHTML = dateObject.toString();
Example 2: javascript date format mm/dd/yyyy
var date_format = new Date();
document.write(innerHTML = date_format.getMonth()+'/'+ date_format.getDate()+'/'+date_format.getFullYear());