TIMEVALUE function
Quick answer
TIMEVALUE converts a time written as text, such as "1:30 PM" or "13:30", into a real time you can add, subtract and format.
- Syntax
=TIMEVALUE(time_text)- Most common use
=TIMEVALUE(A2)returns 1:30 PM ("1:30 PM" as a real time)
Use it on times imported as text or built with text functions. If the text also contains a date, TIMEVALUE keeps only the time.
- Available in
- Every current version
- Category
- Date functions
- Returns
- A fraction of a day from 0 to just under 1; #VALUE! if the text isn't a time.
- Google Sheets
- Works the same in Google Sheets.
Syntax
=TIMEVALUE(time_text)
| Argument | Required? | What it is |
|---|---|---|
time_text | Required | The time as text, such as "1:30 PM". |
Examples
Each result below is calculated from the sample sheet by our formula engine, the same one that grades the practice.
| Cell | Formula | Result | What it shows |
|---|---|---|---|
| B2 | =TIMEVALUE(A2) | 1:30 PM | "1:30 PM" as a real time |
| B3 | =TIMEVALUE(A3) | 7:45 AM | 24-hour text works too |
| B4 | =TIMEVALUE(A4) | 6:20 PM | Only the time is kept from a date and time |
Try it live
This is the sample sheet. Change any number or text, or edit a formula, and the results update.
Show the sample data as a table
| Imported | Result |
| 1:30 PM | 1:30 PM |
| 07:45 | 7:45 AM |
| 1/5/2026 18:20 | 6:20 PM |
Practice TIMEVALUE
Graded instantly, then re-checked on changed data.
Shift lengths from text
A2:B6 were imported as text. In C2, calculate each shift's length in hours. Fill down to C6.Common mistakes
| What you see | Why, and how to fix it |
|---|---|
| #VALUE! | The text isn't a time Excel recognizes, or the cell already holds a real time. TIMEVALUE wants text. |
| A decimal | Format the result as a time. |
Tips
- =(TIMEVALUE(B2)-TIMEVALUE(A2))*24 gives the length of a shift in hours from two text times.
Questions
How do I convert text to a time in Excel?
=TIMEVALUE(A2) for text like "1:30 PM", then format the cell as a time.
What does TIMEVALUE return for a date and time?
Only the time part: TIMEVALUE("1/5/2026 18:20") is 6:20 PM.
Answers that use TIMEVALUE
Updated Checked by running: every formula on this page was run by our formula engine on .