I have date and time strings that might look something like this:
"1 13 2009 2300", "1 14 2009 0", "1 14 2009 100"
what i need to parse DateTime.
I tried:
string[] sExpectedFormats = {"M d yyyy Hmm", "M d yyyy hmm", "M d yyyy 0"};
DateTime dtReportDateTime = DateTime.ParseExact(sReportDateTime,
sExpectedFormats,
System.Globalization.CultureInfo.InvariantCulture,
System.Globalization.DateTimeStyles.None);
but he fails on the third "1 14 2009 100." I'm not sure which format to use for this?
To clarify, I get this data in the feed as part of the date "1 14" and the time part as "100", so I concatenate it so that I can parse the DateTime.
thanks
Karen source
share