I want to convert a string which contains the date in yyyyMMdd format to mm-dd-yyyy DateTime format. How do I get it?
yyyyMMdd
mm-dd-yyyy
var dateString = "20050802"; var date = myDate = DateTime.ParseExact(dateString, "yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture);
1.4m articles
1.4m replys
5 comments
57.0k users