3

我在具有日期时间类型的列的数据表中获取值。之后,我使用Json.Net.

jsonData = JsonConvert.SerializeObject(datatable);

数据表中的日期为:2013-04-03 04:01:24.623 序列化后存储jsonData为:2013-04-03T04:01:24.623

在我的页面上,我将其用作:

timeStamp = new Date(jsonRow.TimeStamp).toLocaleString(); // Here jsonRow.TimeStamp is extracted from the received json response.

Safari,浏览器中,它给出了错误:Invalid Date

4

1 回答 1

1

Here you can find a similar Problem with an accepted Solution Date parsing in javascript is different between safari and chrome

我希望这有帮助 :)

于 2013-04-04T10:10:47.227 回答