# How to convert text to time in Excel

Use `=TIMEVALUE(A2)`. It turns text like "2:45 PM" into a real time you can format and calculate with.

**Excel:** `=TIMEVALUE(A2)` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B |
| --- | --- |
| Imported | Time |
| 2:45 PM |  |
| 09:30 |  |
| 7:05 am |  |
| 23:15 |  |
| 12:00 PM |  |

Formula in B2, filled to B6: `=TIMEVALUE(A2)`

Result: 2:45 PM; 9:30 AM; 7:05 AM; 11:15 PM; 12:00 PM

## 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.

## Other ways

- `=--A2`: The double minus converts time text the same way.
- `=VALUE(A2)`: The same result.

## Common mistakes

- TIMEVALUE drops any date in the text: "3/5/2026 2:45 PM" returns only the time. Use `=--A2` to keep both.
- Times without a colon, like "1430", aren't recognized. Split them into hours and minutes first.

## 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.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/convert-text-to-time
