How to get DateTime from XValue in CursorTool

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
rf2005
Newbie
Newbie
Posts: 11
Joined: Fri Jul 28, 2006 12:00 am

How to get DateTime from XValue in CursorTool

Post by rf2005 » Tue Jan 08, 2008 11:27 am

Hi Guys of Teechart !

We have to solve the following small problem:

We use Teechart .Net and write to the fastline with the .Add(DateTime x, Value y, Color z). What we now want is to receive the actual position of a CursorTool through XValue. XValue is a double. How can we get the DateTime of this XValue?

regards,
rf

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

Post by Narcís » Tue Jan 08, 2008 11:38 am

Hi rf,

You can do something like this:

Code: Select all

			DateTime dt = DateTime.FromOADate(cursor1.XValue);
or this:

Code: Select all

			DateTime dt = Convert.ToDateTime(cursor1.XValue);
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

Post Reply