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

# minutes_add

> Adds the specified minutes to the date, accurate to the minute.

Adds the specified minutes to the date, accurate to the minute.

## Syntax

```Haskell theme={null}
DATETIME minutes_add(DATETIME|DATE date, INT minutes);
```

## Parameters

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

* `minutes`: the minutes to add. It must be of the INT type, it could be greater, equal or less than zero.

## Return value

Returns a DATETIME value.

Returns NULL if either `date` or `minutes` is NULL.

## Examples

```Plain theme={null}
select minutes_add('2022-01-01 01:01:01', 2);
+---------------------------------------+
| minutes_add('2022-01-01 01:01:01', 2) |
+---------------------------------------+
| 2022-01-01 01:03:01                   |
+---------------------------------------+

select minutes_add('2022-01-01 01:01:01', -1);
+----------------------------------------+
| minutes_add('2022-01-01 01:01:01', -1) |
+----------------------------------------+
| 2022-01-01 01:00:01                    |
+----------------------------------------+

select minutes_add('2022-01-01', 1);
+------------------------------+
| minutes_add('2022-01-01', 1) |
+------------------------------+
| 2022-01-01 00:01:00          |
+------------------------------+
```


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