How to convert JavascriptSerializer serialized DateTime string to Javascript Date object

后端 未结 4 2084
别那么骄傲
别那么骄傲 2021-02-07 11:35

After serializing an object with DateTime field with JavaScriptSerializer, I see that the DateTime field looks like this:

         


        
4条回答
  •  温柔的废话
    2021-02-07 12:02

    There is an answer that may help you:

    Parsing Date-and-Times from JavaScript to C#

    If you want to parse datetime string to datetime value with javascript you must use "new Date" like this:

    var data = new Date("1355496152000");
    

提交回复
热议问题