int型时间字符串转日期时间:2021-07-24 05:48:01string re ="201611"; DateTime d1 = DateTime.ParseExact(re, "yyyyMMdd", null);