Date Parsing question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

I have some date value as “100505†and its format as “MMddyyâ€. How to
generate DateTime variable using this data?

TIA
Satya
 
DateTime dt = DateTime.ParseExact("100505", "MMddyy",
System.Globalization.CultureInfo.InvariantCulture);

HTH, Jakob.
 
Back
Top