I got a string which is representend like this :
string startdatetime = "13988110600000"
What I want to do is to convert this string (which are milliseconds) to a DateTime variable. This is what I'm doing :
double ticks = double.Parse(startdatetime);
TimeSpan time = TimeSpan.FromMilliseconds(ticks);
DateTime startdate = new DateTime(time.Ticks);
The result is almost good : I've got a weird date but time is okay (30/04/0045 18:00:00).
Is there any reason to this?
See Question&Answers more detail:os