Possible Duplicate:
How to format a JSON date?
My webs service is returning a DateTime to a jQuery call. The service returns the data in this format:
/Date(1245398693390)/
How can I convert this into a JavaScript-friendly date?
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.
What is returned is milliseconds since epoch. You could do:
On how to format the date exactly as you want, see full
Datereference at http://www.w3schools.com/jsref/jsref_obj_date.aspYou could strip the non-digits by either parsing the integer (as suggested here):
Or applying the following regular expression (from Tominator in the comments):