Forum Discussion
How do I use excel to calculate the difference between two dates
8 Replies
Let's say you have dates in A1 and B1.
In C1, enter the formula
=1440*(B1-A1)
and format C1 as General (or as Number)
Explanation: Excel stores dates and times as numbers, with 1 day as unit. 1 day = 24*60 minutes = 1440 minutes.
- GaedupeCopper Contributor
The values in C2 and D2 are not seen as dates by Excel, but as text values.
You can convert them to real dates and calculate the minutes using the formula
=1440*((DATE(MID(D2,7,4),MID(D2,4,2),LEFT(D2,2))+TIMEVALUE(RIGHT(D2,8)))-(DATE(MID(C2,7,4),MID(C2,4,2),LEFT(C2,2))+TIMEVALUE(RIGHT(C2,8))))
See the attached version.
- rreiser68Copper Contributor
You can use the DATEDIF function. If your dates are entered in cells A3 and A5 you can use the formula DATEDIF(A3,A5).
- rreiser68Copper Contributor
=DATEDIF(A3,A5"D")
- SergeiBaklanDiamond Contributor
=DATEDIF(A3,A5,"D") is more complex equivalent of =INT(A5)-INT(A3) if we speak about datetime, and returns difference in days, not in minutes as it was asked.