TIMEVALUE function
Converts a time written as text, such as "2:30 PM" or "18:45", into an Excel time value.
Available in All versions of Excel (Windows and Mac), Excel for Microsoft 365, Excel for the web
In every Excel versionWorks in Google Sheets
Syntax
TIMEVALUE(time_text)| Argument | What it means | |
|---|---|---|
time_text | Required | Text that Excel recognises as a time, e.g. "18:45", "6:45 PM" or "2026-12-02 07:15". Any date part is ignored. |
Returns: A decimal from 0 to 0.99998843 (fraction of a day).
How TIMEVALUE works
Time stamps exported from web forms, phone systems or databases often land in Excel as text. You cannot subtract text, so totals and durations fail. TIMEVALUE reads the text and returns the real time value — a fraction of a day — that you can calculate with and format as a time.
TIMEVALUE accepts 24-hour ("18:45") and 12-hour ("6:45 PM") styles. If the text also contains a date, the date is simply ignored and only the time is returned; to keep both, add DATEVALUE of the same text. The result is a bare decimal, so format the cell as a time to make it readable.
Examples
1Text time to a time value
| A | |
|---|---|
| 1 | 0.78125 |
Result: 0.78125
18 hours 45 minutes is 18.75 ÷ 24 = 0.78125 of a day. Shown in a General cell; format as hh:mm to see 18:45.
2Convert a 12-hour text time from an export
| A | B | |
|---|---|---|
| 1 | Pickup (text) | Pickup time |
| 2 | 2:30 PM | 14:30 |
Result: 14:30
A2 is text. TIMEVALUE turns it into 0.604166…, displayed as 14:30 with the cell formatted as hh:mm.
3Keep only the time from a date-time text
| A | |
|---|---|
| 1 | 0.302083333 |
Result: 0.302083333
The date is dropped and 07:15 = 7.25 ÷ 24 = 0.302083333 (General format).
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#VALUE! | The text is not a recognisable time, e.g. "7.15" or "7h15". | Replace separators first: =TIMEVALUE(SUBSTITUTE(A2,"h",":")). |
#VALUE! on a real time | The cell already holds a time number, not text. | No conversion needed; reference the cell directly. |
Tips
=--A2converts recognised text times too, and is quicker to type.- Use
=DATEVALUE(A2)+TIMEVALUE(A2)to convert a text date-time into a full date-time value.
Google Sheets
TIMEVALUE also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
TIMEVALUE in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Czech | ČASHODN |
| Danish | TIDSVÆRDI |
| Dutch | TIJDWAARDE |
| Finnish | AIKA_ARVO |
| French | TEMPSVAL |
| German | ZEITWERT |
| Hungarian | IDŐÉRTÉK |
| Italian | ORARIO.VALORE |
| Norwegian (Bokmål) | TIDSVERDI |
| Polish | CZAS.WARTOŚĆ |
| Portuguese (Brazil) | VALOR.TEMPO |
| Portuguese (Portugal) | VALOR.TEMPO |
| Russian | ВРЕМЗНАЧ |
| Spanish | HORANUMERO |
| Swedish | TIDVÄRDE |
| Turkish | ZAMANSAYISI |