Possible Duplicate:
Parsing a complicated string as DateTime
I have a string date with time that I’d like to parse into a DateTime. I’m not quite sure how to tackle it because of the odd format. Help is appreciated.
Example: Mon Mar 24 13-42-30 2008
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
DateTime.ParseExact should do what you want:
Can someone tell me the difference between using
CultureInfo.CurrentCultureandCultureInfo.InvariantCulture, like the other answers? I was assuming things like the day name and month name might need to be parsed in their native language. Thanks.