Wednesday 15 August 2012

c# - How do I parse an RFC822 date in .NET? -


I have the following timeline string given by the Twitter API:

" Thu Apr 26 11:38:36 +0000 2012 "

I need to convert it to the datetime object, so I can see the ParseExact I am calling with a custom format specifier:

  CultureInfo Provider = CultureInfo.InvariantCulture; Datetime Publish Data = DateTime Purse AXt (Twitter ["Created"]. Toasting (), "DAD MMM DD HH: MM: SS Z Yay", provider);   

However, for any type of z , zz or , a FormatException Exception increments zzz for time zone :

The string was not recognized as a valid date time.

Given that this format specification is expecting the time zone to be in the zz: zz format, where time for delimiting hours and minutes There is a colon in the zone.

I have examined other questions on stack overflow like:

No comments:

Post a Comment