# SetAxisTimeFormat

int SetAxisTimeFormat (int panel, int control, int axis, int format, const char formatString[]);

## Purpose

Sets the format string for a graph, digital graph (x-axis only), or strip chart axis that uses the absolute time or relative time format.

If you use absolute time format, LabWindows/CVI displays axis labels as formatted strings that describe fixed points in time. When you use this format, LabWindows/CVI interprets a plotted data value as the number of seconds since midnight, January 1, 1900.

If you use relative time format, LabWindows/CVI displays axis labels as formatted strings that describe the time elapsed since a reference point. When you use this format, LabWindows/CVI interprets a plotted data data value as the number of seconds that have elapsed since the reference point.

The format string supports the same format specifiers as the strftime function with the %nf and @ extensions.

| Note The @ extension is valid only for the relative time format.

## Parameters

Input
Name | Type | Description
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
controlID | integer | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl.
axis | integer | The axis for which you want to set the format string. For graphs, you must specify one of the following values: VAL_BOTTOM_XAXIS, VAL_TOP_XAXIS, VAL_LEFT_YAXIS, or VAL_RIGHT_YAXIS. For strip charts, you must specify VAL_LEFT_YAXIS or VAL_BOTTOM_XAXIS. For digital graphs, you must specify VAL_BOTTOM_XAXIS.
format | integer | The time format for which you want to change the format string. You must specify either VAL_ABSOLUTE_TIME_FORMAT or VAL_RELATIVE_TIME_FORMAT. If you specify VAL_ABSOLUTE_TIME_FORMAT, LabWindows/CVI displays axis labels as formatted strings that describe fixed points in time. If you specify VAL_RELATIVE_TIME_FORMAT, LabWindows/CVI displays axis labels as formatted strings that describe the time elapsed since a reference point.
formatString | string | The format string that specifies how to display date/time values on the axis. This will take effect only if the format of the axis is absolute time or relative time. The format string supports the same format specifiers as the strftime function with the %nf and @ extensions.
| Note The @ extension is valid only for the relative time format.

## Return Value

Name | Type | Description
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
Code | Error Message String
xx | Success