Datedif Function

Datedif Function is used for calculating difference between two dates. I shows the results in days, months or years. Interesting thing is, Datedif Function is not documented in Excel help system.

Syntax for Datedif Function:

=DATEDIF(Date1; Date2; “type”)

Date1: First (earlier) date.

Date2: Second (sooner) date.

Type: Text string that specifies return type.

d: Day. Function returns the number of days between Date1 & Date2.

m: Month. Function returns the number of months between Date1 & Date2.

y: Year. Function returns the number of years between Date1 & Date2.

yd: Days, ignoring years. Function returns the number of months between Date1 & Date2, ignoring years. Which means it will consider both dates has the same year.

ym: Months, ignoring years. Function returns the number of months between Date1 & Date2, ignoring years. Which means it will consider both dates has the same year.

md: Days ignoring both months and years. Function returns the number of months between Date1 & Date2, ignoring years. Which means it will consider both dates has the same month and same year.

Examples:

datedif

You may also like...

Leave a Reply

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