I have javascript date object which gives me a date string in this format, “Tue Sep 04 2012B0100 (GMT Daylight Time)”
I am trying to parse with ParseEaxcat as mentioned here, but it throws an invalid date exception – anyone point me in the direction of the right format
string date = "Tue Sep 04 2012B0100 (GMT Daylight Time)";
dt = DateTime.ParseExact(date,"ddd MMM dd yyyyBzzzz",
CultureInfo.InvariantCulture);
I’ve also looked at this with no joy:
http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
This works. Though, you may want to strip the GMT Daylight Time portion out before passing it in just to avoid the in-line split.
Edited to account for the offset.