I have come across this weird data string, and I really don’t know what I can do to convert it.
“Sat Jan 07 03:18:58 +0000 2012”
Does anyone know how to convert it?
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.
You can use the DateTimeOffset.ParseExact method to specify the exact custom format string that the date is in, like below. I’m using DateTimeOffset because you have the timezone offset value in the string.
Then you can use the different properties of the DateTimeOffset structure to work with the date as necessary.