SOLVED

Calculating months, days, hours, minutes, seconds in Excel

Copper Contributor

I need to calculate months, days, hours, minutes and seconds from date/time stamps: 

 

End time: 4/29/2019  11:36:59 AM (minus) Start time: 3/27/2019  2:27:52 AM = Active time (in months, days, hours, minutes and seconds)

 

I have about 20,000 start/end date/time stamps that I need to calculate into months, days, hours, minutes and seconds. Once this is complete, I need to find the average Active time (suggestions on how to do this are very welcome too).

 

I've tried DATEDIF function, INT function as well as using Cell Format. I can get part of what I need, but not all.

 

Thanks so much! 

21 Replies

@jbonds 

If you are using Windows operation, the formula below will work for you.
=TEXT(DATEVALUE(LEFT(B2,FIND(" ",B2)-1)&"-Jan-1900")+TIMEVALUE(RIGHT(B2,LEN(B2)-FIND(" ",B2)))-DATEVALUE(LEFT(A2,FIND(" ",A2)-1)&"-Jan-1900")-TIMEVALUE(RIGHT(A2,LEN(A2)-FIND(" ",A2))),"[hh]:mm:ss")

@Starrysky1988

It worked like a charm! Thank you so much for your help!!!