Home »
MySQL »
MySQL date/time Functions
MySQL ADDTIME() Function
MySQL | ADDTIME() Function: Learn about the ADDTIME() function, how it works, its usages, syntax, and examples.
Submitted by Apurva Mathur, on October 08, 2022
ADDTIME() Function
If you want to add some time intervals in your date time and you want to know your date time after that interval then in such a date ADDTIME() function is used. This function adds a time interval to the DateTime that you have provided.
ADDTIME() Syntax
SELECT ADDTIME(datetime value, interval time);
ADDTIME() Parameter(s)
- value: This denotes the datetime in which you want to add your intervals.
- time: This is the time that will be added to your datetime value.
ADDTIME() Return Value
It will return the datetime value after adding the interval time that you have provided.
MySQL ADDTIME() Function Example 1
SELECT ADDTIME('2011-15-11', '18.120009');
MySQL ADDTIME() Function Example 2
SELECT ADDTIME('12:45:12', '16.1209:12');
MySQL ADDTIME() Function Example 3
SELECT ADDTIME('2020-08-11', '17.1578000');