Chin
Chin

Reputation: 12712

Date string to Date in C# - day of week was incorrect

Trying to convert the following but am having difficulty. Can anyone see where I'm going wrong? Any help appreciated thanks.

dateString = "Mon Aug 7 15:32:52 GMT+0900 2007";//Actionscript date string
dateResult = DateTime.ParseExact(dateString, "ddd MMM d HH:mm:ss G'M'Tzzz yyyy",
                                  System.Globalization.CultureInfo.InvariantCulture);

Getting the following error:

System.FormatException: String was not recognized as a valid DateTime because the day of week was incorrect..

Upvotes: 2

Views: 1860

Answers (2)

Phil Rykoff
Phil Rykoff

Reputation: 12087

well, the 7 august 2007 was a tuesday is suppose :-)

Upvotes: 1

DaveE
DaveE

Reputation: 3637

August 7, 2007 was a Tuesday.

Upvotes: 4

Related Questions