I want to convert a string in a specific format to a DateTime.
DateTime
My specific string format is \"dd-mm-yyyy\".
dd-mm-yyyy
I cannot do any string
Try DateTime.ParseExact
DateTime.ParseExact("01-05-2009", "dd-MM-yyyy", null)