ADD
All functions > DATE AND TIME > ADD
Returns the date/timestamp after adding a given interval to the given date/timestamp.
Signatures
Temporal addition
Returns: Timestamp after adding the interval
ADD(timestamp: TIMESTAMP, interval: INTERVAL) → TIMESTAMP sql
| Parameter | Type | Required | Description |
|---|---|---|---|
timestamp | TIMESTAMP | Yes | Timestamp to add to |
interval | INTERVAL | Yes | Interval to add |
Signature notes:
- For temporal types, supports adding intervals to dates/timestamps
- Returns NULL if either operand is NULL
- Operator form:
timestamp + interval
See also
Examples
Temporal addition
FeatureQL
SELECT
f1 := TIMESTAMP '2021-01-01' + INTERVAL '1 DAY', -- Temporal addition
f2 := TIMESTAMP '2025-09-01 12:00:00'.ADD(PARSE_DURATION('2 hours 30 minutes')) -- Temporal addition with duration parsing
;Result
| f1 TIMESTAMP | f2 TIMESTAMP |
|---|---|
| 2021-01-02T00:00:00 | 2025-09-01T14:30:00 |