Comment convertir des heures et minutes >24 en décimal ?

Copper Contributor

Bonjour,

Je cherche à convertir un nombre d'heures mensuel travaillées en format digital par exemple 165:05

Est-ce que quelqu'un peut m'aider ?

Merci d'avance

6 Replies

@Carol1805 

To display time over 24 hours, for example 165:05, apply the custom format [h]:mm

 

If you want decimal hours, use a formula to multiply the time with 24 and format the cell with the formula as General or as Number.

 

S0577.png

@Carol1805 

This formula also goes beyond the day.

For example, if work starts at 6:00 p.m. and work ends at 5:00 a.m. on the next day,

it will calculate correctly.

Formula:

=IF(C3<B3,((C3+1)-B3)*24,(C3-B3)*24)

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

@NikolinoDE 

As a comment

=MOD(C3-B3,1)

works

Hello Mr. Baklan, yes you are right,
but I wasn't sure whether the function works with all Excel versions
and since there is no information about the Excel version that is being used,
I wanted to be on the safe side.

With the MOD function it is certainly easier and more elegant.

Thanks

@NikolinoDE 

Interesting. Do you know Excel version for which MOD() is not available?

As I said, since my uncertainty was greater than my knowledge at this moment,
I decided to use this formula to make my proposed solution.
My formula works just as well as MOD(), only with MOD() it is more elegant and simplified to present it as a proposed solution.
No more and no less.

Cheers :)