/// <summary>
/// 时间格式转换(Wed Nov 04 00:00:00 +0800 2009)
/// </summary>
/// <param name="strDate"></param>
/// <returns></returns>
public static DateTime TransDate(string strDate)
{
System.Globalization.CultureInfo cultureInfo =
System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
string format = "ddd MMM d HH:mm:ss zz00 yyyy";
DateTime dt = DateTime.ParseExact(strDate, format, cultureInfo); // 将字符串转换成日期
return dt;
}
/// 时间格式转换(Wed Nov 04 00:00:00 +0800 2009)
/// </summary>
/// <param name="strDate"></param>
/// <returns></returns>
public static DateTime TransDate(string strDate)
{
System.Globalization.CultureInfo cultureInfo =
System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
string format = "ddd MMM d HH:mm:ss zz00 yyyy";
DateTime dt = DateTime.ParseExact(strDate, format, cultureInfo); // 将字符串转换成日期
return dt;
}