Parsing a DateTime containing milliseconds fails for certain cultures. Why?
- by dradovic
I'm trying to parse a string containing milliseconds like this:
string s = "11.05.2010 15:03:08.7718687"; // culture: de-CH
DateTime d = DateTime.Parse(s); // works
However, for example under the de-DE locale, the decimal separator is a comma (not a dot). So the example becomes:
string s = "11.05.2010 15:03:08,7718687"; // culture: de-DE…