Page 1 of 1

How to get DateTime from XValue in CursorTool

Posted: Tue Jan 08, 2008 11:27 am
by 9642017
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

Posted: Tue Jan 08, 2008 11:38 am
by narcis
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);