The TIMEVALUE function converts a time to a fraction of 1. Google Sheets works with times as fractions of a number, not as text strings. This function converts times into their usable form. Noon would be .5 and 6 PM would be .75.
The function can be used with 12 hour AM/PM time or with 24 hour time. If a date and time is given to the function, the date will be ignored, but the time will be converted. To represent seconds, use a second colon. 5 minutes and 12 seconds would be “00:05:12” not “05:12”.
Remember that dates are really just saved as numbers by your spreadsheet with date formatting applied. The date must be in a valid format, so you have to use the DATE function, wrap it in quotes, or use a cell reference to a cell containing a date.
time_text Text representation of a time.
DATEVALUE – Converts a date to a numeric value in a similar way as TIMEVALUE.
HOUR – Returns the hour value from a time
MINUTE – Returns the minute value from a time
SECOND – Returns the second value from a time
#VALUE! – The inputs are something that isn’t a valid time such as “A minute ago” or “Then”.
#NUM – An input is a number but is not a valid time.
Below is an example of this function being used to create an employee timesheet.
Live examples in Sheets
Go to this spreadsheet for the examples of the TIMEVALUE function shown above that you can study and use anywhere you would like.