First, you need to configure the labels of the axes on the graph to display in date/time format. You can do this by going to the Format tab of the graph's property pages at design-time, then select either Time or Date from the built-in format styles list, then select a format string from the format strings list. If you do not see the format that you want in the list, you can create your own format. For more information, see the documentation for the CWAxis.FormatString property in the Measurement Studio reference.
Next, you need to convert the value that's associated with the axis to a date/time representation before you plot it. This conversion factor is also described in the documentation for the CWAxis.FormatString property in the Measurement Studio reference:
"With ActiveX controls, the date is implemented as a floating-point value, measuring days from midnight, 30 December 1899. So, midnight, 31 December 1899, is represented by 1.0. Similarly, 6 AM, 1 January 1900, is represented by 2.25, and midnight, 29 December 1899, is -1.0. However, 6 AM, 29 December 1899, is -1.25. To interpret the time portion, take the absolute value of the fractional part of the number. Thus, 1 second equals 1 / 24 hours / 60 minutes / 60 seconds, which is 1/86400 or approximately 1.157407e-5."
Once you have the value converted to a date/time representation, you can use the graph's PlotXvsY method to plot the data value against the date/time value.
- Elton