jbutko
10/30/2014 - 2:25 PM

#JS, #JavaScript: Convert ISO 8601 time date to separate day/month/year

#JS, #JavaScript: Convert ISO 8601 time date to separate day/month/year

var timeStr = "2010-01-13T18:31:16Z";
var date = new Date(timeStr);
var day = date.getDate();
var year = date.getFullYear();
var month = date.getMonth()+1;
var dateStr = month+"/"+day+"/"+year;
// via http://stackoverflow.com/questions/12498619/convert-iso-8601-time-date-into-plain-english