The TIMEVALUE function in Google Sheets converts a time given as text into the fraction of a 24-hour day it represents, producing a serial time value that Sheets can use in calculations. It's the time-only counterpart to DATEVALUE. Dive into our comprehensive guide to master its application.
Parameters
time_string: A text string representing a time, such as"6:30 PM"or"18:30:00".
Step-by-Step Tutorial
-
Converting a time string to a serial value:
- Example:
=TIMEVALUE("6:00 PM") - Result:
0.75(three-quarters of a day)
- Example:
-
Formatting the result as a time:
- Example:
=TEXT(TIMEVALUE("6:00 PM"), "HH:MM:SS") - Result:
18:00:00
- Example:
Use Cases and Scenarios
- Data Import Cleanup: Convert time values stored as plain text into usable numeric time values.
- Scheduling Calculations: Compare or calculate durations between text-based time entries.
- Time Arithmetic: Combine
TIMEVALUEwithDATEVALUEto reconstruct full date-time values from separate text fields.
Related Functions
DATEVALUE: Converts a date string into a date value.TIME: Converts hour, minute, and second into a time value.