How do I parse and convert DateTime’s to the RFC 822 date-time format?
How do I convert a DateTime structure to its equivalent RFC 822 date-time formatted string representation and parse this string representation back to a DateTime structure in .NET? The RFC-822 date-time format is used in a number of specifications such as the RSS Syndication Format . Try this: DateTime today = DateTime.Now; String rfc822 = today.ToString("r"); Console.WriteLine("RFC-822 date: {0}", rfc822); DateTime parsedRFC822 = DateTime.Parse(rfc822); Console.WriteLine("Date: {0}", parsedRFC822); The "r" format specifier passed into DateTime's ToString() method actually yields an RFC-1123