MAKETIME
MAKETIME is a function in SQL that generates a time value by combining the supplied hours, minutes, and seconds.
MAKETIME(hour, minute, second)
- hour: This parameter specifies the hour value used to generate the time. The value range can be from -838 to 838.
- minute: This parameter indicates the minute component of the time. Its value range is from 0 to 59.
- second: This parameter represents the second portion of the time. Its value range can be from 0 to 59.99, including fractional seconds.
Example
Output
Explanation
In this example, MAKETIME()
function is used to combine hour, minute, and second into a time value. The function takes three parameters - the hour, the minute, and the second. The result is a time string in the format ‘HH:MM:SS’.