I'm getting values in datatable having a column of type DateTime.
After that I'm serializing it using Json.Net.
jsonData = JsonConvert.SerializeObject(datatable);
Date in the datatable was: 2013-04-03 04:01:24.623
Which after serialization stored in jsonData as: 2013-04-03T04:01:24.623
On my page, I'm using it as:
timeStamp = new Date(jsonRow.TimeStamp).toLocaleString(); // Here jsonRow.TimeStamp is extracted from the received json response.
In Safari, browser, it gives error: Invalid Date.
Here you can find a similar Problem with an accepted Solution Date parsing in javascript is different between safari and chrome
i hope this helps :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With