The ts_time() function

The ts_time() function converts a regular time series offset to a time stamp.

Syntax

mi_datetime *
ts_time(ts_tsdesc  *tsdesc, 
         mi_integer N)
ts_desc
The time series descriptor returned by ts_open() for the source time series.
N
The offset to convert. Negative values are allowed.

Description

For example, for a daily time series that starts on Monday, January 1, with a five-day-a-week pattern starting on Monday, this function returns Monday, January 1, when the argument is set to 0; Tuesday, January 2, when the argument is set to 1; Monday, January 8, when the argument is 5; and so on.

The equivalent SQL function is GetStamp.

Returns

The time stamp corresponding to the offset. This value must be freed by the user with mi_free().