# How to convert decimals into days, hours and minutes

#### DAL

##### New Member
Hello, I looked up this formula on Excel forums, but when I use it, it doesn't give me the right result as you can see in the attached file.
=IF(INT(L17/24)=0,"",INT(L17/24)&" Days ")&IF(HOUR(MOD(L17,24)/24)=0,MINUTE(MOD(L17,24)/24)&" Minutes",HOUR(MOD(L17,24)/24)&" Hours")
Thank you.
DAL

#### Attachments

• 28.4 KB Views: 5

#### Excel Wizard

##### Active Member
Maybe try

=IF(SIGN(L17)=-1,"-",)&TEXT(INT(ABS(L17/24)),"[<>0]0 \Da\y\s ;")&TEXT(INT(MOD(ABS(L17),24)),"[<>0]0 \Hour;")

#### Attachments

• 28.6 KB Views: 4

#### DAL

##### New Member
Thank you but unfortunately it doesn't work either. It only gives me the first part of what I need and not for example the days AND the hours AND the minutes. Why? Also : the data here is negative but it could and even should be possible.
Thanks a lot for your help!
Kind regards.

#### Attachments

• 28.3 KB Views: 3

#### vletm

##### Excel Ninja
DAL
Could this give Your expected results?
Note: All filled times have to be correct!
I modified some parts ... times are times!

#### Attachments

• 32.2 KB Views: 5

#### DAL

##### New Member
Hello Vletm, thank you for your input. There is still a problem with column N : when the worker doesn't work for 4 days the number of days he still owes doesn't add correctly. When you take N44 for exemple it should already be -4days....
Working with time and dates is really brainburning for me!
Thanks you.

#### Attachments

• 32.5 KB Views: 6

#### vletm

##### Excel Ninja
DAL
What is problem?
As I wrote Note: All filled times have to be correct!
Are those 'zero times' correct?
As You could see that those number of 'days' has solved from C-column
>> You can modify that as it works with Your needs - eg count dates if those daily start times are over zero.

Working with time and dates are as clear as working with numbers or anything else ... for some reason, You've done it Your way.

#### DAL

##### New Member
You are absolutely right and it works very well. Thanks a million.

#### vletm

##### Excel Ninja
DAL
... but that also would cause some challenges...
If worker left 'sort days' without marking ... is it okay?
If worker works only afternoon?
... and so on.
Do You have a clear idea - what would You need to see from those markings?