[Mono-list] Convert date from rfc822 format to dateTime

Robert Jordan robertj at gmx.net
Mon Oct 25 07:30:00 EDT 2010


On 25.10.2010 12:05, LordPhoenix wrote:
> Hi all,
> anybody knows an easy way to convert date in rfc822 format
> (http://asg.web.cmu.edu/rfc/rfc822.html#sec-5) to a datetime?
>
> I can do it myself but if someone already does the job…

Have you already tried .NET's RFC 1123 parsing? A 1123 parser
is able to parse 822.

DateTime.ParseExact(someString, "R", CultureInfo.InvariantCulture);

Robert




More information about the Mono-list mailing list