Home »
MySQL »
MySQL date/time Functions
MySQL MAKETIME() Function
MySQL | MAKETIME() Function: Learn about the MAKETIME() function, how it works, its usages, syntax, and examples.
Submitted by Apurva Mathur, on October 10, 2022
MAKETIME() Function
The MAKETIME() function is used to make a time from the hour, minutes, and seconds. Isn't this awesome? You only have to provide the hour, minutes, and seconds and this function will tell you the time according to the values that you have provided.
MAKETIME() Syntax
SELECT MAKEDATE('hour', 'minutes' ,'seconds');
MAKETIME() Parameter(s)
This function takes three parameters-
You have to provide the three valid values as the parameters, which will be considered as an hour, minutes, and seconds.
MAKETIME() Return Value
After taking three parameters it will display the time. If the parameters are not valid then in such case it will display NULL.
MySQL MAKETIME() Function Example 1
SELECT MAKETIME('20','56','45');
MySQL MAKETIME() Function Example 2
SELECT MAKETIME('10','10','45');