DateTime to Double ?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
glikoz
Newbie
Newbie
Posts: 50
Joined: Fri Oct 07, 2005 4:00 am

DateTime to Double ?

Post by glikoz » Fri Mar 24, 2006 2:17 pm

How could i convert DateTime variable to Double in TeeChart ..
In Utils reverse operation could be made by Utils.DateTime..

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Mar 24, 2006 2:51 pm

Hi glikoz,

You could use Microsoft .NET Framework's Convert.ToDouble(DateTime value) method.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

glikoz
Newbie
Newbie
Posts: 50
Joined: Fri Oct 07, 2005 4:00 am

Post by glikoz » Fri Mar 24, 2006 3:01 pm

Code: Select all

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

glikoz
Newbie
Newbie
Posts: 50
Joined: Fri Oct 07, 2005 4:00 am

Post by glikoz » Fri Mar 24, 2006 3:12 pm

I found it...
MyDateTime.ToOADate()

Thx..

Post Reply