Date & time function

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)
ArgumentWhat it means
time_textRequiredText 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

A1fx=TIMEVALUE("18:45")
A
10.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

B2fx=TIMEVALUE(A2)
AB
1Pickup (text)Pickup time
22:30 PM14: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

A1fx=TIMEVALUE("2026-12-02 07:15")
A
10.302083333

Result: 0.302083333

The date is dropped and 07:15 = 7.25 ÷ 24 = 0.302083333 (General format).

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 15 KB

Common errors and how to fix them

ErrorWhy it happensFix
#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 timeThe cell already holds a time number, not text.No conversion needed; reference the cell directly.

Tips

  • =--A2 converts 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.

LanguageFunction name
CzechČASHODN
DanishTIDSVÆRDI
DutchTIJDWAARDE
FinnishAIKA_ARVO
FrenchTEMPSVAL
GermanZEITWERT
HungarianIDŐÉRTÉK
ItalianORARIO.VALORE
Norwegian (Bokmål)TIDSVERDI
PolishCZAS.WARTOŚĆ
Portuguese (Brazil)VALOR.TEMPO
Portuguese (Portugal)VALOR.TEMPO
RussianВРЕМЗНАЧ
SpanishHORANUMERO
SwedishTIDVÄRDE
TurkishZAMANSAYISI