something that I could not understand using DateTime.ToOaDate ().
that's what i have
var plainDate = "01/07/2011"; var dateTime1 = DateTime.Parse(plainDate, new CultureInfo("en-GB")); var value = dateTime1.ToOADate(); var dateTime2 = DateTime.Parse(DateTime.FromOADate(value).ToString(), new CultureInfo("en-GB"));
dateTime1 and dateTime2 should be the same, right? I only converted a simple date to tics and then restored it as a DateTime with the same culture, but actually when I run it dateTime2 has the value (January 7, 2011) instead of (July 1, 2011)
user1353726
source share