C# string "yyMMdd" 转DataTime

string str = "211218";
IFormatProvider ifp = new System.Globalization.CultureInfo("zh-CN", true);
DateTime dt = DateTime.ParseExact(str, "yyMMdd", ifp);

 

posted @ 2021-12-18 04:11  ElevenXiao  阅读(288)  评论(0编辑  收藏  举报