The ts_col_id() function

The ts_col_id() function takes a column name and returns the associated column number.

Syntax

mi_integer 
ts_col_id(ts_tsdesc *tsdesc, 
         mi_string *colname)
tsdesc
A time series descriptor returned by ts_open().
colname
The name of the column.

Description

Column numbers start at 0; therefore, the first time stamp column is always column 0.

Returns

The number of the column associated with colname.