본문 바로가기

Web_Application/C#

Convert string format to Datetime



string testDateString  = "19900712";
DateTime testDatetime = DateTime.ParseExact(testDateString, "yyyyMMdd");
string resultDateString = string.Format("{0:yyyy년MM월dd일}", testDatetime);


msdn : https://goo.gl/kLdZ9k