0

In SP online in a list, I have a formula that calculates the difference between two dates and outputs the result in Days+Hours+Min. I was wondering if it's possible to obtain the results only in Hours and Minutes so the result would be 27hrs, 30mins instead of 1day,03hrs, 30mins as on the ex bellow.

enter image description here

The formula I'm currently using. =DATEDIF(Impact_start,Impact_end-(MOD(Impact_start,1)>MOD(Impact_end,1)),"d")&" days, "&TEXT(MOD(Impact_end-Impact_start,1),"hh "" hrs, "" mm "" mins""")

I already tried =TEXT([Impact_end]-[Impact_start]), "h:mm") but sadly it only works for 24h max and I need it to go further than 24h.

Also tried to calculate it in minutes only with =INT(([Column2]-[Column1])*1440) but don't know how to convert the output in HH:MM.

Any help is appreciated.

1 Answer 1

0

Try this:

=(INT((EndDT-StartDT)*1440)-MOD(INT((EndDT-StartDT)*1440),60))/60&" Hours "&MOD(INT((EndDT-StartDT)*1440),60)&" Minutes"

enter image description here

1
  • Works like a charm! Thanks
    – Vitaliy
    Oct 27, 2020 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.