3 ways to convert time to decimal numbers in Excel and how to convert it back
How to convert time to decimal numbers in Excel
1. Use math
The simplest way to convert time to decimal in Excel is to multiply the original time value by the number of hours, minutes, and seconds in the day:
To convert time to hours, multiply the time by 24 (the number of hours in a day).
To convert time to minutes, multiply the time by 1440 (minutes in a day = 24 * 60).
To convert time to seconds, multiply the time by 86400 (number of seconds in a day = 24 * 60 * 60).
For example, we have the following time table:
In column B to calculate the time, use the formula B2=A2 *24, copy it to the remaining cells in column B, you will get the number of hours in decimal form.
Similarly, convert to minutes according to the formula: C2 =A2*24*60
Convert to seconds according to the formula: D2 =A2*24*60*60
2. Use the CONVERT function
Another way to perform time conversion to decimal is to use the CONVERT function
Function syntax: =CONVERT(number;from_unit;to_unit)
In there:
Number is the original number to be converted.
from_unit is the unit of the original number.
to_unit is the unit to convert.
Unit values:
'day' = if unit is day.
'hr' = unit is hour.
'mn' = unit is minute.
'sec' = unit is seconds.
With the above example, the default from_unit value is 'day', and you want to convert to hours, we have the formula:
=CONVERT(A2;'day';'hr')
To convert to minutes we have the formula:
=CONVERT(A2;'day';'mn') or: =CONVERT(B2;'hr';'mn')
To convert to seconds we have the formula:
=CONVERT(A2;'day';'sec') or =CONVERT(B2;'hr';'sec') or =CONVERT(C2;'mn';'sec')
3. Use the functions HOUR, MINUTE, SECOND
Finally, you can use a more complex formula. Export time units using the time functions HOUR, MINUTE, SECOND then use the summation operation.
Function syntax:
= HOUR(serial_number)
= MINUTE(serial_number)
= SECOND(serial_number)
In which: serial_number is the number to convert.
With the example above, you type the formula as follows:
B2 = HOUR (A2)
C2 = MINUTE (A2)
D2 = SECOND (A2)
To calculate the total number of hours in column E, the formula will be hours + minutes/60 + seconds/360
Formula: =B2+C2/60+D2/3600 . Copy the formula to the remaining rows in the column. You get the following results:
To calculate the total number of minutes in column F, the formula will be hours*60 + minutes + seconds/60
Formula: =B2*60+C2+D2/60 . Copy the formula to the remaining rows in the column. You get the following results:
To calculate the total number of seconds in column G, the formula will be hours*3600 + minutes*60 + seconds
Formula: =B2*3600+C2*60+D2 . Copy the formula to the remaining rows in the column. You get the following results:
You should read it
- How to fix the SUM function doesn't add up in Excel
- Guidance on how to align Excel correctly
- How to keep Excel and Excel columns fixed?
- What is ### error in Excel? how to fix ### error in Excel
- How to display 0 in front of a number in Excel
- Instructions for searching and replacing in Excel tables
- MS Excel 2007 - Lesson 2: Customizing in Excel
- 3 ways down the line in Excel, line break, down row in 1 Excel cell
May be interested
- How to convert negative numbers to positive numbers Excelto convert negative numbers to positive numbers and vice versa on excel, you only need to perform a very simple operation.
- How to Convert from Binary to Decimalthe binary system is the internal language of electronic computers. if you are a serious computer programmer, you should understand how to convert from binary to decimal. this wikihow will show you how to do this. === using positional...
- How to convert numbers to dates in Excelconverting digital data into dates in excel is a pretty useful trick for people who use this software. sometimes your date data cells are converted into digital data cells, then if you do not know how to turn it back into a date, please refer to the following tutorial tips of tipsmake.com .
- How to convert numbers into text in Excel is greatthis article introduces how to convert numbers into letters in excel extremely useful
- How to Convert .Numbers to .Xlsthis wikihow teaches you how to convert an apple numbers document into a microsoft excel (.xls) file on a mac, a windows computer, and an iphone, as well as within the icloud website. go to https://www.icloud.com/ in a web browser. you can...
- How to convert a sequence of numbers into dates in Excelon excel, we can convert the sequence of numbers into dates without manually entering data.
- Simple way to convert Excel files to PDFconverting excel files to pdf will help create more professional documents, preventing the spreadsheet from being modified during the exchange process. so how to convert excel to pdf?
- How to convert money amounts to words in Excel, no add-in needed, supports both 32-bit and 64-bit Excelconvert numbers to words in excel, convert amounts to words with excel versions from 2003 to 2016, excel is free like wps office, no need to install add-ins, supports both 32-bit and 64-bit versions.
- Instructions to stamp negative numbers in Excelduring the spreadsheet process on excel, we will have to work with many types of numbers, including negative numbers. and if you want to differentiate negative numbers from other numbers in the data sheet, you can format close or red brackets to distinguish them.
- Zalo, Viber will automatically convert the subscription number from 11 numbers to 10 numbersusers of zalo and viber will be supported to continue using the service completely automatically when the time of sim 11 to 10 numbers is implemented starting from 00:00 on september 15, 2018 instead of having to be updated again. phone number manually.