I am parsing a date from a file as a string and converting it to DateTime
so that I can compare it with a previous date. I am losing the milliseconds when I do this which are extremely important as I am missing lines from the file I am parsing.
Example of Date From File I am extracting: 2014/11/12 10:47:23.571
m_LatestProcessDate
after I do ParseExact 12/11/2014 10:47:23
See below line of code I am using. Any ideas how I get around this?
DateTime m_LatestProcessDate = DateTime.ParseExact(m_CurrentDateString,
"yyyy/MM/dd HH:mm:ss.fff",
CultureInfo.InvariantCulture);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…