How to convert text to time in Excel
Formula (Excel and Google Sheets)
=TIMEVALUE(A2)Use =TIMEVALUE(A2). It turns text like "2:45 PM" into a real time you can format and calculate with.
- Result on the example
- one result per row in
B2, filled down toB6 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in B2, filled down to B6. Change any input and the result updates, or edit the formula to experiment.
How it works
TIMEVALUE reads text that looks like a time and returns the fraction of a day it stands for: "2:45 PM" becomes 0.6146. Format the result as a time to see it as a clock time.
=TIMEVALUE(A2)Result0.6145833333
A2"2:45 PM"The value in A2.
TIMEVALUE(A2)0.6145833333TIMEVALUE: Converts time text such as "1:30 PM" into a time.- time_text
A2"2:45 PM"
- time_text
In Google Sheets
The same formula works in Google Sheets: =TIMEVALUE(A2). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =--A2 | 2:45 PM, 9:30 AM, 7:05 AM… | The double minus converts time text the same way. |
| =VALUE(A2) | 2:45 PM, 9:30 AM, 7:05 AM… | The same result. |
Common mistakes
- TIMEVALUE drops any date in the text: "3/5/2026 2:45 PM" returns only the time. Use
=--A2to keep both. - Times without a colon, like "1430", aren't recognized. Split them into hours and minutes first.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Convert text to time
B2, convert the imported text in A2 to a real time, and fill down to B6.Questions
How do I convert a whole column?
In Excel 365, =TIMEVALUE(A2:A6) spills down the column.
Why does the result show 0.6146?
That is the time as a fraction of a day. Format the cell as h:mm AM/PM.
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.