I would like to parse a date like this "1.09.开发者_运维问答2011"? Should I use the IFormatProvider?
I know that I can try to replace the point with the replace method but i don't like the idea.
Try DateTime.ParseExact( myString, "d.MM.yyyy", CultureInfo.InvariantCulture);
EDIT
Change the format from "dd.MM.yyyy"
to "d.MM.yyyy"
to properly reflect Dran's input string.
DateTime.ParseExact
allows you to specify a format string.
精彩评论