Page 1 of 1

DateTime to Double ?

Posted: Fri Mar 24, 2006 2:17 pm
by 9638762
How could i convert DateTime variable to Double in TeeChart ..
In Utils reverse operation could be made by Utils.DateTime..

Posted: Fri Mar 24, 2006 2:51 pm
by narcis
Hi glikoz,

You could use Microsoft .NET Framework's Convert.ToDouble(DateTime value) method.

Posted: Fri Mar 24, 2006 3:01 pm
by 9638762

Code: Select all

DateTime d = new DateTime(1998, 1, 1);
double e = Convert.ToDouble(d);
Try and get InvalidCastException !

Posted: Fri Mar 24, 2006 3:12 pm
by 9638762
I found it...
MyDateTime.ToOADate()

Thx..