How to Parse JSON Date on client side by java script.

I have date in json format at client side :/Date(1352745000000)/ and we want to parse in 2012-11-27 11:16 format. Code for do this

var JsonDateTime = "<strong>/Date(1352745000000)/</strong>";
dateTime = JsonDateTime;
dateTime = new Date(parseInt(dateTime.substr(6)));
dateTime = dateTime.getFullYear() + "-" +
("0" + (dateTime.getMonth() + 1)).slice(-2) + "-" +
("0" + dateTime.getDate()).slice(-2) + " " + ("0" + dateTime.getHours()).slice(-2) + ":" +
("0" + dateTime.getMinutes()).slice(-2);

Another Article

C#: How to Serialize JSON Array data by c# on server side.
How to Create Drag and Drop By J query.
How to get Dragable or Dropable element ID or attribute value in J-Query.
How to call server side method by jquery or java script in
How to add javascript file by c# code in page.
Java Script: How to Get hidden or input field value by java script/ j-Query.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s