SQL - Scalar functions - ADD_SECONDS
The ADD_SECONDS function returns a timestamp value that represents the first argument plus a specified number of seconds and fractional seconds.
The schema is SYSIBM.
The result of the function is a timestamp with the same precision as expression, if expression is a timestamp. Otherwise, the result is a TIMESTAMP(12). If any argument can be null, the result can be null; if any argument is null, the result is the null value.
SET :ADD_SECOND = ADD_SECONDS(CURRENT TIMESTAMP, 1)
SET :ADD_SECOND = ADD_SECONDS(:TIMESTAMP,3.123)
SET :TIMESTAMPHV = TIMESTAMP '2008-2-28-23.58.59.123456' + 61.654321 SECONDS SET :TIMESTAMPHV = ADD_SECONDS(TIMESTAMP '2008-2-28-23.58.59.123456', 61.654321)
SET :TIMESTAMPHV = TIMESTAMP '2008-2-29-23.59.59.123456' + 61.654321 SECONDS SET :TIMESTAMPHV = ADD_SECONDS(TIMESTAMP '2008-2-29-23.59.59.123456', 61.654321)
SET :ADD_SECOND = ADD_SECONDS(:TIMESTAMP,-3.123)