ParseExact problem

  • Thread starter Thread starter Dermot O'Loughlin
  • Start date Start date
D

Dermot O'Loughlin

Please see the following code where i am trying to parse a date time string:

DateTime dt = DateTime.ParseExact("08/02/2005", "dd/mm/yyyy", null);

When doing a watch on dt the date get sets to 1/8/2005

This happens for any date string that i try to parse - any ideas.

Thanks,
Dermot.
 
Dermot,

Yes because you probably want to use the month MM and not the minutes mm
which are not in your string.

:-)

Cor
 
Back
Top