How do I format a Microsoft JSON date?

后端 未结 30 3179
伪装坚强ぢ
伪装坚强ぢ 2020-11-21 04:48

I\'m taking my first crack at Ajax with jQuery. I\'m getting my data onto my page, but I\'m having some trouble with the JSON data that is returned for Date data types. Basi

30条回答
  •  南笙
    南笙 (楼主)
    2020-11-21 05:03

    If you say in JavaScript,

    var thedate = new Date(1224043200000);
    alert(thedate);
    

    you will see that it's the correct date, and you can use that anywhere in JavaScript code with any framework.

提交回复
热议问题