MySQL MAKETIME() function
MySQL MAKETIME() makes and returns a time value from a given hour, minute and seconds. The value of hour may be greater than 24 but the value of minutes and second greater than 59 return NULL.
This function is useful in -
- MAKETIME() is valuable for generating custom time values with specific hour, minute, and second components.
- MAKETIME() aids in time-based analysis, allowing you to generate specific time points for data examination.
- MAKETIME() helps represent time values for custom purposes that do not follow the standard hour-minute-second format.
- When working with datasets that include hour, minute, and second components, MAKETIME() is used to generate accurate time values for further processing.
- MAKETIME() aids in scenarios where time-dependent logic needs to be applied, such as triggering actions at specific times.
- The function supports calculations involving time values, allowing for adjustments and transformations.
- In applications that require the initialization of time-related data, MAKETIME() helps create initial time values.
|hour||Indicates an hour.|
MySQL Version: 8.0
Example: MySQL MAKETIME() function
The following statement will make a time value from 15 hours, 25 minutes and 36 seconds.
mysql> SELECT MAKETIME(15,25,36); +--------------------+ | MAKETIME(15,25,36) | +--------------------+ | 15:25:36 | +--------------------+ 1 row in set (0.01 sec)
All Date and Time Functions:
Click here to see the MySQL Date and time functions.
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook