How can I manipulate a date time in the format below (I believe it is ISO 8601 format) with JavaScript?
2010-01-13T18:31:16Z
I\'d like to output as dd/mm/yyy
You can easily change the format with an regex, e.g.
return datestring.replace(/(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)Z/, "$3/$2/$1 $4:$5:$6");
or, you parse the string to a Date object, and extract the single values (or many more, like the weekday etc):
var date = new Date(datestring); // parses ISO 8601
return date.getDate()+"/"+(date.getMonth()+1)+"/"+date.getFullYear()+" "+…