ID EN
#Date and time

TIMEVALUE

Excel Functions

Get a valid time from a text string

Syntax

EXCEL
=TIMEVALUE(time_text)

Arguments

Parameter Description
time_text A date and/or time in a text format recognized by Excel.

Return Value

A valid Excel time as a decimal number

Details

Sometimes, times in Excel appear as text values that are not recognized properly as time. The TIMEVALUE function is meant to parse a time that appears as a text value into a valid Excel time. A native Excel time is more useful than text because it is a numeric value that can be formatted as time and directly manipulated in a formula. The TIMEVALUE function takes just one argument, called time_text. If time_text is a cell address, the value in the cell must be text. If time_textis entered directly into the formula it must be enclosed in double quotes (""). Time_text should be supplied in a text format that Excel can recognize, for example, "6:45 PM" or "18:45". TIMEVALUE ignores dates if present in a text string. The TIMEVALUE function creates a time in serial number format from a date and/

Examples

Examples

The formulas below show the output from TIMEVALUE:

EXCEL
=TIMEVALUE("12:00") // returns 0.5
=TIMEVALUE("12:00 PM") // returns 0.5
=TIMEVALUE("18:00") // returns 0.75
Alternative formula

Notice that the TIMEVALUE formula in C15 fails with a #VALUE! error, because cell B15 already contains a valid time. This is a limitation of the TIMEV

EXCEL
=A1+0

See Also

DATEVALUE TIMEVALUE VALUE NUMBERVALUE