Possible Duplicate:
How do I output an ISO-8601 formatted string in Javascript?
I have a date like
Thu Jul 12 2012 01:20:46 GMT+0530
How can I convert it into ISO-8601 format like this
2012-07-12T01:20:46Z
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.
In most newer browsers you have
.toISOString()method, but in IE8 or older you can use the following (taken from json2.js by Douglas Crockford):Now you can safely call `.toISOString() method.