How to add 5 hours to current time in MySQL?

MySQLMySQLi Database

To add 5 hours in current time, we will use now() function from MySQL. The syntax is as follows −

SELECT date_add(now(),interval some integer value hour);

Now, I am applying the above query to add 5 hours to current time. The query is as follows −

mysql> SELECT date_add(now(),interval 5 hour);

The following is the output

| date_add(now(),interval 5 hour) |
| 2018-10-11 15:59:23             |
1 row in set (0.00 sec)

Look at the output above, it has increased the current time by 5 hours

Updated on 25-Jun-2020 08:32:37