How to Use the TIME Function to Return Time Values in Excel
How to Use the TIME Function to Return Time Values in Excel: The TIME function returns a decimal number for a specific time value. Follow the article below to understand how to use the TIME function in Excel.
1. Syntax of the TIME function
Function syntax: =TIME(hour, minute, second)
Where:
- Hour: a required argument, is a number from 0 to 32767 representing the hour.
- Minute: a required argument, is a number from 0 to 32767 representing the minute.
- Second: a required argument, is a number from 0 to 32767 representing the second.
Note:
- Any hour value greater than 23 will be divided by 24 and the remainder will be considered the hour value. For example, TIME(31, 0, 0) = TIME(7, 0, 0) = 0.291666667 or 7:00 AM.
- Any minute value greater than 59 will be converted to hours and minutes. For example, TIME(0, 83, 0) = TIME(1, 23, 0) = 0.057638889 or 1:23 AM.
- Any second value greater than 59 will be converted to hours, minutes, and seconds. For example, TIME(0, 0, 1120) = TIME(0, 18, 40) = 0.012962963 or 12:18:40 AM.
- The decimal number returned by the TIME function is a value from 0 to 0.99988426, representing time from 0:00:00 (12:00:00 AM) to 23:59:59 (11:59:59 PM).
2. How to use the TIME function
For example, if we want to find the decimal part of the time 4 hours, 23 minutes, and 11 seconds, we can apply the function syntax as follows:
=TIME(4, 23, 11)
If the cell format is set to General before entering the formula, the result will be returned in time format.
If the hour is greater than 23, the minute is greater than 59, or the second is greater than 59, the time will be converted to the corresponding hour, minute, and second.
In conclusion, the article above has guided you on how to use the TIME function in Excel. Hopefully, through this article, you have understood how to use this function. Good luck!