> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

> Reference material for DATE_ADD function

# DATE_ADD

Computes a new TIMESTAMP or TIMESTAMPTZ value by adding or subtracting a specified number of time units from a DATE, TIMESTAMP, or TIMESTAMPTZ value.
It's similar to [arithmetic with intervals](/reference-sql/lexical-structure/operators#arithmetic-with-date%2Ftime-and-intervals), but it also allows using a column reference for the `<quantity>`.

## Syntax

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
DATE_ADD('<unit>', <quantity>, <expression>)
```

## Parameters

| Parameter      | Description                                                                                                                                                                             |
| :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<unit>`       | A TEXT literal specifying the time unit. Must be one of `microsecond`,`millisecond`,`second`,`minute`,`hour`,`day`,`week`,`month`,`quarter`,`year`,`decade`,`century`, or `millennium`. |
| `<quantity>`   | An INT or BIGINT specifying how often the time unit should be added or subtracted to `<expression>`.                                                                                    |
| `<expression>` | An expression evaluating to type DATE, TIMESTAMP, or TIMESTAMPTZ.                                                                                                                       |

## Return Types

TIMESTAMP if `<expression>` has type DATE or TIMESTAMP.
TIMESTAMPTZ if `<expression>` has type TIMESTAMPTZ.

## Example

<div className="query-window">
  ```
  SELECT date_add('week', 4, '2024-04-15 12:13:14'::timestamp);
  ```

  | date\_add <span>timestamp</span> |
  | :------------------------------- |
  | 2024-05-13 12:13:14              |

  <p><span>Rows: 1</span><span>Execution time: 5.91ms</span></p>
</div>
