|  

» Calculating Number of Days, Weeks, Months and Years between Dates

Problem:

Calculating the difference between each pair of dates listed in columns
A & B.

Solution:

To calculate the difference in days, use the DATEDIF function as shown in the following formula:
=DATEDIF(A2,B2,"d")

To calculate the difference in weeks, use the INT function as shown in the following formula:
=INT((B2-A2)/7)

To calculate the difference in months, use the DATEDIF function as shown in the following formula:
=DATEDIF(A2,B2,"m")

To calculate the difference in years, use one of the following two solutions:
Use the DATEDIF function as shown in the following formula:
=DATEDIF(A2,B2,"y")

OR

Use the YEAR, MONTH, AND, and DAY functions as shown in the following formula:

=YEAR(B2)-YEAR(A2)-(MONTH(B2) To calculate the number of months over years, use the DATEDIF function as shown in the following formula:
=DATEDIF(A2,B2,"ym")

To calculate the number of days over years, use the DATEDIF function as shown in the following formula:
=DATEDIF(A2,B2,"yd")


Rate This Tip
12 34 5
Rating: 3.90     Views: 108639
Need date formula
Chuck Miller
I am looking for a date formula which will announce "Due to Expire" when a date is 2 months from expiration. Does anyone know of such a formula?
Excluding the weekend
Migdad
Dear,
how can I calculate the days between two dates (Excluding the weekends)
I am working in Saudi Arabia and the weekends over here are Thursday and Friday.

please send me the answer to Migdad@hotmail.com
abc
yogita
how can I calculate the days between two dates (Excluding the sunday only)?
Dates
Kumodi74
I am looking for a fomula that will calculate the amount of days between 2 dates excluding weekends
Dates
Dee
I am looking for a fomula that will calculate the amount of days between 2 dates excluding weekends
Excluding the weekend
Not Reallyhere
You are a doofus, set your time to a realisic time zone.
counting days between two dates including both
DPS
I am looking for a formula to count all days between two dates including start and end date - currently one of the days is dropped when using the formula.
Click here to post comment
For Registered Users
Name
Comment Title
Comments