
= INT(A2 - B2) & " days, "& TEXT(A2 - B2," h"" hours, "" m"" minutes, "" s"" seconds""") //where A2 is EndDate and B2 is the StartDate The only difference will be that instead of 24, you will multiply 1440 in the formula, and replace the text string with the word "minutes" like so: Get Difference Between Two Dates (with Time) in Minutes As I said, the INT function removes decimals so the return (24 hours) looks more pleasant to the eye. Now, you could get away with just the bare-bones formula nested inside the INT function, and you will still receive pretty much the same output without adding the text string at the end. Well, we want our final output in hours, right? If our current output is in terms of days, multiplying it by 24 will convert it to hours. Outside the bracket, we are multiplying the output by 24. Great, so the final difference between our 2 DateTimes is (1 + 0.02112 days) or 1.02112 days. The fraction that we get, as a result, will naturally be in terms of days and can be directly added to the 1 day we computed earlier. To compute the fraction, we will divide 1825 seconds by 86,400 seconds (i.e. The total seconds, therefore, are 1825 seconds.
#25 minus minutes serial number
Just like it assigns a serial number for a date, it assigns a fraction for time. Get Difference Between Two Dates (with Time) in Hoursīefore we get into these computations, it is important to know how Excel interprets time.

When you add a concatenation operator between these formulas, all the returned strings are displayed in a single cell giving us our final output "9 years, 5 months, 21 days". The second formula computes months and adds the string " months," to give us the output "5 months," and the third formula returns "21 days". = DATEDIF(B2,A2," y")&" years," & DATEDIF(B2,A2," ym")&" months," & DATEDIF(B2,A2," md")&" days"Īdding a concatenation operator allows us to display the output from these 3 formulas in a single cell.įirst, the formula computes years and adds the string " years," which gives us the output "9 years" in our example.
