Format JSON Date.

Hello,

Below is way to format JSON Date.

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

The substr function takes out the "/Date(" part, and the parseInt function gets the integer and ignores the ")/" at the end. The resulting number is passed into the Date constructor.

if you are using newtonsoft then see at below location.
https://www.newtonsoft.com/json

Posted in |

0 comments:

Post a Comment