Q: C#: Date string formatting? I have DateOfBirth in "11021970" format but I want this as "11-02-1970" format only.
I don't know how to convert datetime to date using c#?

A: DateTime.ParseExact("11021970", "ddMMyyyy", System.Globalization.CultureInfo.InvariantCulture);

