The ts_tstamp_plus() function

The ts_tstamp_plus() function returns a time stamp at a specified number of intervals after a starting date you specify.

Syntax

mi_datetime *
ts_tstamp_plus(mi_datetime  *startdate, 
               mi_integer   cnt,
               mi_integer   interval, 
               mi_datetime  *result)
startdate
The date to start from.
cnt
The number of intervals to add to the start date.
interval
The interval, as described next.
result
The resulting date.

Description

Valid values for the interval parameter can be found in tseries.h. They are:
  • TS_SECOND
  • TS_MINUTE
  • TS_HOUR
  • TS_DAY
  • TS_WEEK
  • TS_MONTH
  • TS_YEAR

If the result parameter is NULL, then a result mi_datetime structure is allocated and returned; otherwise, the return value is the given result parameter.

Returns

The time stamp at the specified number of intervals after the start date.