3

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.

mike44
  • 802
  • 5
  • 15
  • 36
  • I think [this][1] may help with your problem. [1]: http://stackoverflow.com/questions/6427204/date-parsing-in-javascript-is-different-between-safari-and-chrome – GLlompart Apr 04 '13 at 10:11

1 Answers1

1

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 :)

Community
  • 1
  • 1
winner_joiner
  • 12,173
  • 4
  • 36
  • 61