What error do you get? The code looks right so it should convert the string.
Ryshad
Nearly a Posting Virtuoso
1,307 posts since Aug 2009
Reputation Points: 512
Solved Threads: 246
DateTime datetime = DateTime.ParseExact("10/10/2009 12:00:00", "MM/dd/yyyy HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture);
Assuming the 10/10/2009 is day/month/year and really, the above solutions should work just fine.
You mean month/day/year, surely? :)
Ryshad
Nearly a Posting Virtuoso
1,307 posts since Aug 2009
Reputation Points: 512
Solved Threads: 246