I have a web application that passes a DateTime from one page to another through the query string. It was working just fine in both IE and FireFox, but was throwing excepti
It may just be that your format doesn't cover the (Eastern Daylight Time) section. Try parsing that out of your string using regular string handling methods, then calling ParseExact on the remainder.
Edit: As Oded points out, you'll also have to put the GMT into your format string as a literal:
"ffffd MMM dd yyyy HH:mm:ss 'GMT'zzz"
The following works:
var input = "Wed Oct 03 2012 08:00:00 GMT-0400 (Eastern Daylight Time)";
var trim = input.Substring(0, input.IndexOf(" ("));
var dt = DateTime.ParseExact(
trim,
"ffffd MMM dd yyyy HH:mm:ss 'GMT'zzz",
CultureInfo.InvariantCulture);