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-

  • hours
  • minutes
  • seconds

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

MySQL MAKETIME() Function Example 2

SELECT MAKETIME('10','10','45');
Example 2: MySQL MAKETIME() Function


Comments and Discussions!

Load comments ↻





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