string str = "20100101120000";
DateTime dt = DateTime.ParseExact(str, "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture);
//DateTime dt = Tools.StringHelp.GetDateTime(str);
Response.Write(dt.Year.ToString() + " , " + dt.Month.ToString() + " , "
+ dt.Day.ToString() + " , " + dt.Hour.ToString() + " , " + dt.Minute.ToString()
+ " , " + dt.Second.ToString());
c#字符串转时间
最新推荐文章于 2023-11-18 07:33:42 发布