Dates function
Excel TIMEVALUE function
TIMEVALUE converts a time written as text, such as "17:45" or "4:35 PM", into a decimal fraction of a day: noon is 0.5. Use it when imported times will not add up or sort, then format the result as a time.
=TIMEVALUE(time_text)Arguments
time_text- Text that looks like a time, in quotes or in a cell. Any date in the text is ignored.
TIMEVALUE examples
Every result below was calculated from this sample sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | |
|---|---|---|---|
| 1 | Name | In (text) | Out (text) |
| 2 | Jo | 8:05 AM | 4:35 PM |
| 3 | Sam | 9:30 | 17:45 |
| 4 | Ola | 2026-10-05 07:50 | 2026-10-05 15:20 |
Download this sheet as an Excel practice file (.xlsx)
Result: 0.33680555556 shows as 8:05 AM with the custom h:mm AM/PM format
Returns about 0.3368, the fraction of a day for 8:05 AM. Format it as a time to read it.
Result: 0.35416666667 shows as 8:30 with the custom h:mm format
The length of Jo’s shift: 0.354 of a day, which is 8:30 as a time.
Result: 8.25
Multiply by 24 for decimal hours, ready for payroll: Sam worked 8.25 hours.
Result: 0.32638888889 shows as 7:50 AM with the custom h:mm AM/PM format
The date part is ignored, so only 7:50 AM comes back.
How to use TIMEVALUE
- Click the cell next to the text time.
- Type =TIMEVALUE( and click the text cell.
- Press Enter. You see a decimal such as 0.3368.
- Format the cell as a time (Ctrl+1 > Time), then fill down.
Common TIMEVALUE mistakes
#VALUE! on a real time
TIMEVALUE only accepts text. If =ISNUMBER(B2) is TRUE, the cell is already a time and needs no conversion.
Negative hours on night shifts
A shift from 10:00 PM to 6:00 AM gives a negative result. Use =MOD(TIMEVALUE(C2)-TIMEVALUE(B2),1) so it wraps past midnight.
Seeing a decimal
That is the time as a fraction of a day, so 0.5 is noon. Format the cell as a time, or multiply by 24 for hours.
TIMEVALUE FAQ
How do I convert text to time in Excel?
Use =TIMEVALUE(A2) and format the result as a time. =VALUE(A2) works too, and Data > Text to Columns > Finish converts a whole column in place.
How do I extract the time from a date and time in Excel?
For a real date-time use =MOD(A2,1). For text such as "2026-10-05 07:50" use =TIMEVALUE(A2), which ignores the date.
Why does TIMEVALUE return #VALUE!?
The cell already holds a real time, or the text is not a time Excel can read, such as "8h05" or "half past 8".
Related functions
TIMEBuilds a timeDATEVALUEText date to a real dateTEXTNumber to formatted textMODRemainder after division
Updated