%TimeAdd meta-SQL element

Syntax

%TimeAdd(datetime, add-minutes)

Description

This construct generates the SQL that adds add-minutes (a positive or negative integer literal or expression, provided that the expression resolves to a data type that can be used in datetime arithmetic for the given RDBMS) to the provided datetime (which can be a datetime literal or expression).

Note:

On some platforms, you can use time-value in place of datetime. However, this can give a SQL error on other platforms. This meta-SQL construct is not implemented for COBOL.

Parameters

Parameter Description

time

Specify a Time or DateTime value to add more time to.

add-minutes

Specify the number of minutes to add to time. This must be a numeric value or an expression that resolves to a numeric value.

Example

SELECT %TimeAdd(%CurrentTimeIn, 60) FROM %SelectNoTable