Cicode Programming Reference > Cicode Function Categories > Trend Functions Introduction > TrnGetCursorTime

TrnGetCursorTime

Gets the time and date at a trend cursor for a specified pen.

Syntax

TrnGetCursorTime(AN, Pen)

AN:

The AN where the trend is located.

Pen:

The trend pen number:

0 - The pen currently in focus

1...8 - Pen1. . .Pen8

Return Value

A time/date variable. If the trend cursor is disabled, 0 (zero) is returned. If AN or Pen is invalid, 0 (zero) is returned and an error code is set.

Related Functions

TrnGetBufTime

Example

! For the trend at AN20
INT time;
time = TrnGetCursorTime(20,1);
DspText(31,0,TimeToStr(time,2));
! Displays the trend cursor date for Pen1.
DspText(32,0,TimeToStr(time,1));
! Displays the trend cursor time for Pen1.

See Also

Trend Functions