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

# seconds_add

> 向日期时间添加指定的秒数。

向 `expr1` 添加指定的时间间隔，单位为秒。

## 语法

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

## 参数说明

`expr1`: 支持的数据类型为 DATETIME。

`expr2`: 支持的数据类型为 INT，单位为秒。

## 返回值说明

返回值的数据类型为 DATETIME。如果输入值为 DATE 类型，则时-分-秒部分默认按照 00:00:00 处理。

## 示例

```Plain Text theme={null}
select seconds_add('2010-11-30 23:50:50', 2);
+---------------------------------------+
| seconds_add('2010-11-30 23:50:50', 2) |
+---------------------------------------+
| 2010-11-30 23:50:52                   |
+---------------------------------------+

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


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