怎样把字符串类型转换成时间类型比如string scsj=2007729 怎么转换成时间类型的2007729[解决办法]建议楼主日月固定为两位,这样就可以这样识别 DateTime dt = DateTime.ParseExact( "20070729 ", "yyyyMMdd ",null);