Date differences using the DATEDIF function

The DATEDIF function allows you to represent the difference between two dates in various formats. It has three arguments for you to enter; the start date, end date and units you are counting in.

 

E.g. =DATEDIF(A1,B1,”D”) will return the difference in days between the values in A1 and B1.

 

Here are some examples showing the difference between the date entered in cell B3 and today’s date, represented in Years, Months and Days:

 

DateDifFunction

 

There are numerous other formats, including YM and MD which can be used. If we assume B3 is someone’s date of birth we can actually represent their full age using:

=DATEDIF(B3,TODAY(),”Y”)&” Years, “&DATEDIF(B3,TODAY(),”YM”)&” Months, “&DATEDIF(B3,TODAY(),”MD”)&” Days”

That would return: 49 Years, 6 Months, 18 Days

1 Comment on “Date differences using the DATEDIF function

Leave a Reply

Your email address will not be published. Required fields are marked *