9

Possible Duplicate:
How to format a JSON date?

I have a JSON that contains some dates that I need to be in a UTC format.

At present if I alert the dates out they are in the following format:

/Date(1329314400000)/

I am trying to loop round the JSON but am unsure on how to convert the above date format to UTC.

If anyone has any advice I would greatly appreciate it.

Community
  • 1
  • 1
JIbber4568
  • 839
  • 4
  • 16
  • 33
  • 1
    This might help http://stackoverflow.com/questions/4673527/converting-milliseconds-to-a-date-jquery-js –  Oct 11 '12 at 09:42

1 Answers1

6

Check this out: How do I format a Microsoft JSON date?

var date = new Date(parseInt(jsonDate.substr(6)));
Community
  • 1
  • 1
arpad
  • 541
  • 5
  • 10