Turn a JavaScript Date into a .NET DateTime value

Posted by: Rick Strahls WebLog, on 29 Mar 2006 | View original | Bookmarked: 0 time(s)

Argh… this is annoying. I was mucking around with a Callback function in Anthem that's sending back a date from JavaScript. Anthem allows making JSON page method calls to the server, but it doesn't provide two way JSON support so any data passed from the client passes values as strings.   Well, dates come back in a really fucked up toString() format that is a pain to parse.   JavaScript has Date.toUTCString() and Date.toGTMString(), but these are returning different things for different...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2450 | Hits: 158

Similar Posts

  • SQL SERVER Denali Date and Time Functions DATEFROMPARTS() DATETIMEFROMPARTS() DATETIME2FROMPARTS() TIMEFROMPARTS() SMALLDATETIMEFROMPARTS() DATETIMEOFFSETFROMPARTS() A Quick Introduction more
  • Eschewing Date Types in our Database more
  • LINQ Tip of the week: System.DateTime support more
  • AJAX Logging with Exponential Backoff more
  • The fallacy of the always-valid entity more
  • Native JSON Parsing: What does it mean? more
  • Building Interactive User Interfaces with Microsoft ASP.NET AJAX: A Look at JSON Serialization more
  • Constructors and Inheritance Why is this still so painful? more
  • Astoria query Cheat Sheet more
  • SQL SERVER - Retrieve - Select Only Date Part From DateTime - Best Practice - Part 2 more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD