dragonfly dragonfly - 1 year ago 186
ASP.NET (C#) Question

How to convert JavascriptSerializer serialized DateTime string to Javascript Date object

After serializing an object with

field with
, I see that the
field looks like this:

EffectiveFrom: "/Date(1355496152000)/"

How can I convert this string to Javascript Date object?

Answer Source

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");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download