Click here to Skip to main content
15,867,977 members
Articles / Programming Languages / XML

Converting a .NET DateTime object to a JavaScript Date object

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
1 Oct 2012CPOL 29.7K   5  
When using a WCF or ASMX web service in ASP.NET, you might find the need to pass back a DateTime object via JSON. However, what you might not realize is that by passing a .NET DateTime object back to JavaScript, you’d receive an “Invalid date” script exception. The data being passe

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

No alternatives have been posted.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions