TIMEVALUE
Converts a time represented as text into an Excel serial number for time.
=TIMEVALUE(time_text)This static page keeps the function indexed for search, while the spreadsheet app handles interactive exploration and saved formulas.
What the function does
Overview
Converts a time represented as text into an Excel serial number for time.
The TIMEVALUE function parses a text string that represents a time and returns it as a decimal number between 0 (0:00:00 AM) and 0.999988426 (23:59:59 PM). This serial number is a fraction of a 24-hour day. For instance, 0.5 represents 12:00 PM. This function is crucial when you receive time data as text and need to perform calculations or comparisons with it. It correctly interprets various time formats, including those with AM/PM indicators. If the `ext` argument contains date information, TIMEVALUE ignores it and only converts the time portion. If the `ext` cannot be parsed into a valid time, it will result in a #VALUE! error. Best practice is to ensure the input text closely matches standard time formats for reliable conversion, as ambiguous formats might lead to unexpected results or errors.
Quick reference
Syntax
=TIMEVALUE(time_text)
Inputs
Arguments
Example: "2:30 PM"
Formula patterns
Examples
Converting a simple time string
=TIMEVALUE("2:30 PM")Converting a time string with seconds
=TIMEVALUE("14:15:30")Avoid these issues
Common Errors
#VALUE!
Cause: The 'time_text' argument is not a valid time string that Excel can interpret.
Fix: Ensure the 'time_text' argument is in a recognizable time format, such as "HH:MM AM/PM" or "HH:MM:SS".
#VALUE!
Cause: The 'time_text' argument refers to an empty cell or a non-text value that cannot be converted.
Fix: Verify that the cell referenced by 'time_text' contains a valid time string.
Platform support
Compatibility
Available in Excel 365 and earlier versions.
Source: Microsoft Support
Common questions
Frequently Asked Questions
Converts a time represented as text into an Excel serial number for time.
ext: A text string representing a time in any Excel time format.
#VALUE!: Ensure the 'ext' argument is in a recognizable time format, such as "HH:MM AM/PM" or "HH:MM:SS". #VALUE!: Verify that the cell referenced by 'ext' contains a valid time string.