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

# quarters_add

> Adds a specified number of quarters to the date, accurate to the quarter.

Adds a specified number of quarters to the date. One quarter equals three months.

## Syntax

```Haskell theme={null}
DATETIME quarters_add(DATETIME expr1, INT expr2);
```

## Parameters

* `expr1`: the start time. It must be of the DATETIME or DATE type.

* `expr2`: the quarters to add. It must be of the INT type. It can be greater, equal, or less than zero. A negative value subtracts quarters from `expr1`.

## Return value

Returns a DATETIME value.

## Examples

```Plain theme={null}
select quarters_add('2019-08-01 13:21:03', 1);
+----------------------------------------+
| quarters_add('2019-08-01 13:21:03', 1) |
+----------------------------------------+
| 2019-11-01 13:21:03                    |
+----------------------------------------+

select quarters_add('2019-08-01', 1);
+-------------------------------+
| quarters_add('2019-08-01', 1) |
+-------------------------------+
| 2019-11-01 00:00:00           |
+-------------------------------+

select quarters_add('2019-08-01 13:21:03', -1);
+-----------------------------------------+
| quarters_add('2019-08-01 13:21:03', -1) |
+-----------------------------------------+
| 2019-05-01 13:21:03                     |
+-----------------------------------------+
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.