Expressions.expr-primary-odbc-timestampadd

Adds a number of specified intervals to a timestamp

Format

{{ FN TIMESTAMPADD( IntervalType, Intervals, Timestamp ) }}

Remarks

Returns a timestamp calculated by adding a number of Intervals of IntervalType to Timestamp. Where Intervals can be any whole number numeric expression and Timestamp is any date\time expression.

The following table specifies possible values for IntervalType.

IntervalType Description
SQL_TSI_FRAC_SECOND Thousandths of a second
SQL_TSI_SECOND Seconds
SQL_TSI_MINUTE Minutes
SQL_TSI_HOUR Hours
SQL_TSI_DAY Days
SQL_TSI_WEEK Weeks
SQL_TSI_MONTH Months
SQL_TSI_QUARTER Quarters of year
SQL_TSI_YEAR Years
Example:

{ FN TIMESTAMPADD( SQL_TSI_SECOND, 15, TIMESTAMP '2006-08-02 00:00:00' ) }


Disclaimer

Geo SCADA Expert 2020