DATEDIF()

Syntax. DATEDIF(start_date,end_date,unit)

Definition. This function calculates the interval between a start and an end date (period) in years, months, or days.

Arguments

Background. This function calculates the interval between two dates (see Figure 7-1). You can enter all dates as strings enclosed in quotation marks, as serial numbers, or as the result of other formulas and functions.

Example. To calculate the employment period for employees up to a specified date, use the DATEDIF() function. For an employee hired on January 1, 2006, the calculation

=DATEDIF("01/01/2006","11/13/2011","Y")

returns 5 years for the period up to the date November 13, 2011. The formula

=DATEDIF("01/01/2006","11/30/2011","M")

calculates 70 months for the period up to November 13, 2011.

Calculating the interval between dates.

Figure 7-1. Calculating the interval between dates.

See Also

DAYS360(), EDATE(), EOMONTH(), NETWORKDAYS(), NETWORKDAYS.INTL()