Wednesday, 2 July 2014

how to convert date in json format to normal format

var d = new Date(parseInt('/Date(1245398693390)/'.slice(6, -2)));
alert('' + (1 + d.getMonth()) + '/' + d.getDate() + '/' + d.getFullYear().toString().slice(-2));

No comments:

Post a Comment