ADD_SECONDS

Purpose

This function adds a specified number of seconds to a timestamp.

Syntax

add_seconds::=

Add Seconds

Usage Notes

  • Up to three digits after the decimal point can be processed.
  • For data type TIMESTAMP WITH LOCAL TIME ZONE this function is calculated internally within UTC before the result is transformed to the session time zone.

Example

SELECT ADD_SECONDS(TIMESTAMP '2000-01-01 00:00:00',-1) AS1,
       ADD_SECONDS(TIMESTAMP '2000-01-01 00:00:00',+1.234) AS2;
Result
AS1 AS2
1999-12-31 23:59:59.000000 2000-01-01 00:00:01.234000