using System;
public class MainClass
{
public static void Main()
{
string[] dateStrings = {"2010-05-01T07:34:42-5:00",
"2010-05-01 7:34:42Z",
"Thu, 01 May 2010 07:34:42 GMT"};
foreach (string dateString in dateStrings)
{
DateTime convertedDate = DateTime.Parse(dateString);
Console.WriteLine(convertedDate.Kind.ToString());
Console.WriteLine(convertedDate);
}
}
}
|