Convert hours to days, hours, minutes in Excel

Hi trying to find the excel formula to convert (days,hours,mins, secs into total minutes) so for instance I have :

  • B3=End date and time (07/11/2019 14:38)
  • A3=Start date and time (07/11/2019 14:19)
  • C3=Duration between the 2 above date&times)
  • D3=Output result 0 days 0 hours 19 mins 0 secs

How or what formula can I use to convert D3 into total number of MINUTES. My D3 column has this formula in it "=INT(B3-A3)&" days "&TEXT(B3-A3,"h"" hrs ""m"" mins""s""sec """

Convert hours to days, hours, minutes in Excel

Arjan

30.8k14 gold badges74 silver badges112 bronze badges

asked Dec 5, 2019 at 16:59

Convert hours to days, hours, minutes in Excel

4

Assuming 136:35:00 is in Cell A1, try

=CEILING(TEXT(A1, "[h]")/8,1)

If you're looking for day and hours combination, then try

=FLOOR(A1*3,1)&" Days and "&TEXT(SUM(A1,-TIME(8,0,0)*FLOOR(A1*3,1))," h") & " Hours " & MINUTE(A1) & " Minutes "& SECOND(A1) & " Seconds"

Convert hours to days, hours, minutes in Excel

If you are not interested in Seconds, then use

=FLOOR(A1*3,1)&" Days and "&TEXT(SUM(A1,-TIME(8,0,0)*FLOOR(A1*3,1))," h") & " Hours " & MINUTE(A1) & " Minutes "

EDIT :

FLOOR Function

Syntax : FLOOR(number, significance) where number is numeric value you want to round and significance is multiple to which you want to round

FLOOR function rounds a number down to the nearest multiple of significance.

Now, for example say you have 25:00:00 in Cell A1 then to break it down to number of days (as your requirement is to calculate number of days based on 8 hours a day), you'll have to use =FLOOR(A1*24/8,1) which is same as =FLOOR(A1*3,1). This will give result as 1 day.

You can also use another simpler formula

=INT(A1/"8:00")&" days "&TEXT(MOD(A1/"8:00",1)*8/24,"h"" Hours ""m"" Minutes ""s"" Seconds""")

In the example shown, the goal is to enter a valid time based on days, hours, and minutes, then display the result as total hours.

The key is to understand that time in Excel is just a number. 1 day = 24 hours, and 1 hour = 0.0412 (1/24). That means 12 hours = 0.5, 6 hours = 0.25, and so on. Because time is just a number, you can add time to days and display the result using a custom number format, or with your own formula, as explained below.

In the example shown, the formula in cell F5 is:

=B5+TIME(C5,D5,0)

On the right side of the formula, the TIME function is used to assemble a valid time from its component parts (hours, minutes, seconds). Hours come from column C, minutes from column D, and seconds are hardcoded as zero. TIME returns 0.5, since 12 hours equals one half day:

TIME(12,0,0) // returns 0.5

With the number 1 in C5, we can simplify the formula to:

=1+0.5

which returns 1.5 as a final result. To display this result as total hours, a custom number format is used:

[h]:mm

The square brackets tell Excel to display hours over 24, since by default Excel will reset to zero at each 24 hour interval (like a clock). The result is a time like "36:00", since 1.5 is a day and a half, or 36 hours.

The formula in G5 simply points back to F5:

=F5

The custom number format used to display a result like "1d 12h 0m" is:

d"d" h"h" m"m"

More than 31 days

Using "d" to display days in a custom number format works fine up to 31 days. However, after 31 days, Excel will reset days to zero. This does not affect hours, which will continue to display properly with the number format [h].

Unfortunately, a custom number format like [d] is not supported. However, in this example, since days, hours, and minutes are already broken out separately, you can write your own formula to display days, minutes, and hours like this:

=B5&"d "&C5&"h "&D5&"m"

This is an example of concatenation. We are simply embedding all three numeric values into single text string, joined together with the ampersand (&) operator.

If you want to display an existing time value as a text string, you can use a formula like this:

=INT(A1)&" days "&TEXT(A1,"h"" hrs ""m"" mins """)

where A1 contains time. The INT function simply returns the integer portion of the number (days). The TEXT function is used to format hours and minutes. 

How do I convert hours to day in Excel?

=HOUR(serial_number) This function uses only one argument: Serial_number (required argument) – The time that contains the hour we want to find. It will return the hour of the time value. The hour given will be an integer between 0 to 23 where 0 represents 12:00 AM and 23 represents 11:00 PM.

How do I convert numbers to hours and days in Excel?

How to convert numbers to time format in Excel.
Divide the numbers by 24 (there are 24 hours in a day). The formula can be as simple as =A2/24..
Select the cell(s) with the formula result, right-click and select Format Cells from the context menu or press Ctrl+1..

How do I convert time formats in Excel?

On the Home tab, in the Number group, click the Dialog Box Launcher next to Number. You can also press CTRL+1 to open the Format Cells dialog box. In the Category list, click Date or Time. In the Type list, click the date or time format that you want to use.

What is the formula for hours to days?

How to Convert Hours to Days. To convert an hour measurement to a day measurement, divide the time by the conversion ratio. The time in days is equal to the hours divided by 24.