//如何把这个字符串转化成时间类型啊,急
 string s = "Sep 10 13:56:53 2009";

解决方案 »

  1.   

    string s = "Sep 10 13:56:53 2009";DateTime dt=DateTime.Parse(s);
      

  2.   

    string str = "Sep 10 13:56:53 2009";string[] arr = str.Split(' ');
    Convert.ToDateTime(string.Format("{0} {1} {2} {3}", arr[0], arr[1], arr[3], arr[2]));
      

  3.   

    你看看 MessageBox.Show(new DateTime(2009,9,10,13,56,53).ToString());显示的是什么
    有可能是你的格式不对
    或者是文化不对,你试试用英国的文化
      

  4.   

    Sep 10 13:56:53 2009
    不是一个时间格式吧
    直接转换肯定错误的
    4楼的应该可行