0

I have a SharePoint list with two date columns. I want to create calculated column which gives the number of days, hours and minutes between these two dates.

I have looked at all possible threads, but the DATEDIF function does not work.

=DATEDIF([A],[B],"D")
=DATEDIF([A],[B];"D")
=DATEDIF([B],[A],"D")
=DATEDIF([B],[A];"D")

No combination with DATEDIF works.

Below formula is ok but without Days because shows a strange value

=TEXT(B-A;"d hh:mm")

enter image description here

0

With combination of MOD() and TEXT() functions we can accomplish this. Try the below formula by replacing the actual column names in your list

=(((INT(([End Time]-[Start Time])*1440)-MOD(INT(([End Time]-[Start Time])*1440),60))/60)-(MOD((INT(([End Time]-[Start Time])*1440)-MOD(INT(([End Time]-[Start Time])*1440),60))/60,24)))/24&" Days "&MOD((INT(([End Time]-[Start Time])*1440)-MOD(INT(([End Time]-[Start Time])*1440),60))/60,24)&" Hours "&(MOD(INT(([End Time]-[Start Time])*1440),60)+1)&" Minutes"

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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