The TIME function
Builds a time from an hour, a minute and a second. The result is a fraction of a day, so TIME(12,0,0) is 0.5.
Syntax
TIME(hour, minute, second)- hour
- The hour, 0 to 23. Larger numbers wrap around the day.
- minute
- The minute. 60 or more carries over into hours.
- second
- The second. 60 or more carries over into minutes.
Examples
B1=TEXT(TIME(14,30,0),"h:mm AM/PM")
| A | B | |
|---|---|---|
| 1 | 2:30 PM |
B1
=TIME(112,20,30)| A | B | |
|---|---|---|
| 1 | 0.5 |
In plain words: The time 112 hours, 20 minutes and 30 seconds into the day.
B1=TEXT(TIME(8,0,0)+TIME(0,450,0),"h:mm")
| A | B | |
|---|---|---|
| 1 | 15:30 |
Questions
Why does my time show as a decimal number?
Times are fractions of a day, so 12:00 PM is 0.5. Format the cell as a time (Ctrl+1 > Time) to see it as a clock time.
How do I add hours or minutes to a time?
Add a TIME to it, as in =A2+TIME(3,0,0) for three hours later or =A2+TIME(0,45,0) for 45 minutes.