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');
Example 1: MySQL ADDTIME() Function

MySQL ADDTIME() Function Example 2

SELECT ADDTIME('12:45:12', '16.1209:12');
Example 2: MySQL ADDTIME() Function

MySQL ADDTIME() Function Example 3

SELECT ADDTIME('2020-08-11', '17.1578000');
Example 3: MySQL ADDTIME() Function



Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.