DateTime support allows the display of date and/or time values to be displayed on any x or y-axis.  The DateTime format is implemented as a floating-point value (double), measuring days from midnight, December 30, 1899.  So, midnight, December 31, 1899 is represented by 1.0.  Similarly, 6 AM, January 1, 1900 is represented by 2.25.

XY Chart lists a number of Date, Time and DateTime formats in the drop down on the X and Y-Axes property page (X Axes shown below).  This is only a small sample of the many possible format strings.  Any combination of the codes can be used to create specific date time formats. 


E.g. For a value of 38045.444445868056, the format strings below yield the following results:

Format String Result
h:mm:ss 9:40:00
hh:mm:ss 09:40:00
hh:mm:ss.fff 09:40:00.123
hh:mm:ss.fff AMPM 09:40:00.123 AM
m/d/yy 2/28/04
dd-mmm-yyyy 28-Feb-2004
mmmm dd, yyyy hh:mm:ss.fff AMPM February 28, 2004 09:40:00.123 AM

To Enable Feature

To configure Date/Time along an x-axis, use X-Axes Property Page or programmatically set the XScale property.

To configure Date/Time along a y-axis, use Y-Axes Property Page or programmatically set the YScale property.

XScale(1).FormatStyle = fsDateTime
XScale(1).DateTimeFormat = "
hh:mm:ss AMPM"