Summary
The Excel TIME function creates a specific time value from individual hour, minute, and second components. It’s useful for assembling times within formulas or for constructing times based on variable inputs.
Syntax
=TIME(hour, minute, second)
- hour: The hour component.
- minute: The minute component.
- second: The second component.
Return value
A decimal number representing a specific time in Excel, as a fraction of a 24-hour day.
How to use
The TIME function is used to build an Excel time from supplied hour, minute, and second values. The function caters to times within a 24-hour period, ranging from 0 (midnight) to just before midnight. Apply a time number format to display the result as a conventional time.
Examples
Simple TIME
Creating Specific Times: To create a specific time based on individual components:
=TIME(14, 30, 15)
Creates 2:30:15 PM.
=TIME(9, 45, 0)
Generates 9:45:00 AM.
=TIME(23, 59, 59)
Results in 11:59:59 PM.
TIME with Large Increments
Handling Large Time Increments: To create time values using large time increments:
=TIME(0, 150, 0)
Converts 150 minutes to 2:30 AM.
=TIME(27, 0, 0)
Adjusts 27 hours to 3:00 AM next day.
=TIME(0, 0, 5000)
Turns 5000 seconds into 1:23:20 AM.
Additional Notes
- The TIME function “resets” at the 24-hour mark, similar to a 24-hour clock.
- It does not accept numeric inputs larger than 32,767 for any component, resulting in a #NUM! error for higher values.
- For durations beyond 24 hours, a direct conversion formula like
hours/24 + minutes/1440 + seconds/86400can be used.