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/yyyy hh:mm:ss.
Thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you really want plain English, why not convert the string to a Date and call date.toLocaleString(), or toUTCString() if you want GMT.
var time=new Date(‘2010-01-13T18:31:16Z’).toLocaleString();
If you want to support IE8 and older browsers you’ll need translate the string:
var time= Date.fromISO(‘2010-01-13T18:31:16Z’).toLocaleString();
returned value: (String) Wednesday, January 13, 2010 1:31:16 PM