How to convert decimal numbers to time in Excel
To convert a decimal number to time format (hours, minutes, seconds) in Excel, you should use basic functions to convert the values. You will separate the decimal number using the HOUR, MINUTE, and SECOND functions with the same method. Then, use the TIME function to combine them into a complete time. All operations are very simple and quick to perform. Read the article below to learn how to convert a decimal number to time format in Excel.
For example, we have decimal numbers that need to be converted into time as shown in the figure below. To convert decimal numbers to time, we need to separate each hour, minute, and second of that time by using the HOUR, MINUTE, SECOND functions. Then, use the TIME function to combine them into a complete time. Please follow the steps below.
Step 1: Separate the hour number
First, we will need to separate the hour number from the decimal number using the HOUR function. The structure of the HOUR function is as follows:
Function syntax: = HOUR(serial_number)
Where: serial_number: required argument, is the time containing the hour you want to extract.
Applying the above HOUR function structure, we have the formula in cell B2 as follows:
= HOUR(A2)
Copying the formula for the remaining cells in column B, we will quickly separate the hour number.
Step 2: Separate the minute number
Next, we will need to separate the minute number from the decimal number using the MINUTE function. The structure of the MINUTE function is as follows:
Function syntax: = MINUTE(serial_number)
Where: serial_number: required argument, is the time containing the minute you want to extract.
Applying the above MINUTE function structure, we have the formula in cell C2 as follows:
= MINUTE(A2)
Copying the formula for the remaining cells in column C, we will quickly separate the minute number.
Step 3: Separate the second number
Next, we will need to separate the second number from the decimal number using the SECOND function. The structure of the SECOND function is as follows:
Function syntax: = SECOND(serial_number)
Where: serial_number: required argument, is the time containing the second you want to extract.
Applying the above SECOND function structure, we have the formula in cell D2 as follows:
= SECOND(A2)
Copying the formula for the remaining cells in column D, we will quickly separate the second number.
Step 4: Combine the time
After we have separated the hour, minute, and second numbers, we combine them into a complete time using the TIME function. The structure of the TIME function is as follows:
Function syntax: = TIME(hour; minute; second)
Where:
Hour: required argument, is a number from 0 to 32767 that represents hours.
Minute: required argument, is a number from 0 to 32767 that represents minutes.
Second: required argument, is a number from 0 to 32767 that represents seconds.
Applying the above TIME function structure, we have the formula in cell E2 as follows:
= TIME(B2; C2; D2)
Copying the formula for the remaining cells in column E, we will obtain the complete time.
Thus, the above article has guided you on how to convert decimal numbers to time in Excel. We hope this article will be helpful to you in the future.