ChartDirector 6.2 (.NET Edition)



[C#] public static double CTime(DateTime time);
[VB] Public Shared Function CTime(time As DateTime) As Double


Converts a .NET DateTime to ChartDirector's date/time format.

In common date/time charts, the x-axis represents dates/times, while the y-axis represents numeric data. For these cases, ChartDirector provides overloaded methods that supports both numeric values and .NET DateTime values as inputs.

However, it is possible in some special applications, both x and y-axes can represent dates/times. ChartDirector supports this type of usage, but its API only allows "double precision numbers" as y-value inputs. In these cases, CTime can be used to convert .NET DateTime to ChartDirector's date/time format, which uses double precision numbers to represent dates/times.


time(Mandatory)A .NET DateTime object.

Return Value

A number representing dates/time in ChartDirector's date/time format.