Where time is the cell containing the time to convert to decimal.
It will separate the hour, minute, and the second value from the time and then convert the minute and second to its corresponding decimal forms relative to the hour. 3600 is the number of seconds in 1 hour. The resulting decimal will be in hours.
Below are the steps to use this formula.
1. Identify the Cell where The Time Value is Located
For our example, we have a sheet containing a set of timestamps in Column A. We want to convert them to time in hours, with minutes and seconds converted to decimals.
For Row 2, we have the time stored in cell A2 and we want to insert the formula to B2.
2. Use Formula =HOUR(time)+(MINUTE(time)/60) + (SECOND(time)/3600)
For Row 2, the time to convert is stored in cell A2. The formula becomes
=HOUR(A2)+(MINUTE(A2)/60) + (SECOND(A2)/3600)
You can insert this to B2.
Alternatively, you can type the formula by itself, clicking the cell A2 in the process, but it can take more time.
3. Press Enter
We now have the time converted to decimals!
If it is the first time you insert this formula, Google Sheets will do something. Check the next step.
4. Autofill to Other Rows
If it is the first time you have inserted this formula, Google Sheets will suggest auto filling other rows with timestamps as well. Click the check mark.
The formula has been applied to all other rows.
You can also change the number of decimals by selecting the range, then clicking the Decrease decimal places icon along the main toolbar.
For our example we will click the icon a few times to reduce the number of decimals to two:
How do you Convert Decimal to Time in Google Sheets?
If instead you are given the number of hours with decimals, you can convert the decimals to minutes and seconds. Follow the steps above, but this time using the formula below: