将string转换成DateTime,简单小问题!
例如
string time=DateTime.Now.ToString( "yyyyMMddHHmmss ");
DateTime dt=Convert.ToDateTime(time);
后面那句怎么改,才会成功转换回来?
------解决方案--------------------DateTime dt = DateTime.ParseExact(time, "yyyyMMddHHmmss ",System.Globalization.CultureInfo.CurrentCulture);