---
title: "DATEADD"
description: "The DATEADD SQL function adds a quantity of time to a date."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/dateadd
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/dateadd
updated: 2026-08-09T00:00:00Z
license: https://documentation.invantive.eu/en/
---

## Syntax
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> DATEADD[DATEADD]:::quoted
    DATEADD --> End((END))
```

## Purpose
The `DATEADD` SQL function adds a quantity of time to a date.

Parameters:
- Interval (`varchar2`): the date interval to be added, chosen from `year`, `yyyy`, `yy`, `quarter`, `qq`, `q`, `month`, `mm`, `m`,  `day`, `dy`, `y`, `week`, `ww`, `wk`, `hour`, `hh`, `minute`, `mi`, `n`, `second`, `ss`, `s`, `millisecond` and `ms`.
- Number (`int32`): the quantity of interval duration to add.
- Date (`datetime`): the date to which the interval should be added.

Returns: the date with the number of intervals added as `datetime`.

## Examples
The following example adds 3 weeks to a date:
```sql
select dateadd('week', 3, to_date('19870315', 'YYYYMMDD'))

-------------------
05-04-1987 00:00:00
```
The following example adds 7 days to a date:
```sql
select dateadd('y', 7, to_date('19870315', 'YYYYMMDD'))

-------------------
22-03-1987 00:00:00
```