# Calculate the difference between two dates in hours and minutes

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. 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

Try this:

``````=(INT((EndDT-StartDT)*1440)-MOD(INT((EndDT-StartDT)*1440),60))/60&" Hours "&MOD(INT((EndDT-StartDT)*1440),60)&" Minutes"
`````` • Works like a charm! Thanks – Vitaliy Oct 27 '20 at 17:55