issue with DateTime.ToOADate()
c#, datetime
Solution
I think it's because your call to ToString does not specify the culture info.
Try `ToString(new CultureInfo("en-GB"))` as well.
Problem
there's something i couldn't understand with DateTime.ToOaDate(). here'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 plain date into ticks and then recovered it as DateTime with the same culture,, but actually when i run it dateTime2 has the value of (7-Jan-2011) instead of (1-Jul-2011)