I\'m trying to get JavaScript to parse a date and time format for me, with the eventual aim of telling me the days passed since that date and the time right now (locally).
The expected format is the American format: m/d/yyyy hh:mm:ss
m/d/yyyy hh:mm:ss
var date1 = new Date("2008-10-01 06:21:43"); //fails var date2 = new Date("10/1/2008 06:21:43"); //works correctly