August 23 2010

Parse JSON Date into a javascript Date object

I’m recording this here so I don’t ever have to look for this solution again.  It works perfectly with .net date json serialization and +400  timezones as well!

var date = new Date(parseInt(jsonDate.substr(6)));

The substr strips out the leading “Date” meta text.

Comments (View)
blog comments powered by Disqus

Please...

Leave a comment if this has helped or offended you.

StackOverflow Id