String to DateTime

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I have a string that contains a date in the format dd-MM-yyyy.

How can I convert it to a DateTime?

The format is always dd-MM-yyyy so I need to specify that.

Thank You,
Miguel
 
I have a string that contains a date in the format dd-MM-yyyy.

How can I convert it to a DateTime?

The format is always dd-MM-yyyy so I need to specify that.

DateTime.ParseExact or DateTime.TryParseExact should
enable you to do that.

Arne
 
Back
Top