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

# microseconds_add

> Adds a time interval to a date value.

Adds a time interval to a date value. The time interval is in microseconds.

## Syntax

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

## Parameters

`expr1`: the time expression. It must be of the DATETIME type.

`expr2`: the time interval you want to add, in microseconds. It must be of the INT type.

## Return value

Returns a value of the DATETIME type. If the input value is of the DATE type, the hour, minute, and seconds parts are processed as `00:00:00`.

## Examples

```Plain Text theme={null}
select microseconds_add('2010-11-30 23:50:50', 2);
+--------------------------------------------+
| microseconds_add('2010-11-30 23:50:50', 2) |
+--------------------------------------------+
| 2010-11-30 23:50:50.000002                 |
+--------------------------------------------+
1 row in set (0.00 sec)

select microseconds_add('2010-11-30', 2);
+-----------------------------------+
| microseconds_add('2010-11-30', 2) |
+-----------------------------------+
| 2010-11-30 00:00:00.000002        |
+-----------------------------------+
```


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