VeloDB Cloud
SQL Manual
Functions
date-time-functions
hours_add

hours_add

description

Syntax:

DATETIME HOURS_ADD(DATETIME date, INT hours)

This function adds the specified hours to the given date.

date can be of DATE or DATETIME type, and the returned result is of DATETIME type.

Example

mysql> select hours_add("2020-02-02 02:02:02", 1);
+-------------------------------------+
| hours_add('2020-02-02 02:02:02', 1) |
+-------------------------------------+
| 2020-02-02 03:02:02                 |
+-------------------------------------+

Keywords

HOURS_ADD