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
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2377 | Hits: 158

Similar Posts

  • Implementing a jQuery-Calendar ASP.NET Control more
  • Native JSON Parsing: What does it mean? more
  • Lookbehind in Regex searches more
  • Iterating on an ASP.NET MVC Model Binder more
  • AJAX Logging with Exponential Backoff more
  • UppercuT - Automated Builds - UppercuT.config more
  • LINQ Tip of the week: System.DateTime support more
  • The fallacy of the always-valid entity more
  • Eschewing Date Types in our Database more
  • LINQ Tip of the week: System.DateTime support 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