My application is getting a datetime value from JSON in the following format:
Created
"/Date(1335232596000)/"
To show the value on the front end, I wrote a js function with the following code:
return new Date(parseInt(date.substr(6)));
This however, shows the following:
Mon Apr 23 2012 20:56:36 GMT-0500 (Central Daylight Time)
Any suggestions on how can I get the date to display like this:
"04/23/2012 - 08:56:26pm CST"
Use the official jQuery Globalization Plugin format method:
There are a ton of date formatting options available.