Microsoft Office Tutorials and References
In Depth Information
In contrast to YEARFRAC, the DATEDIF function calculates complete years,
months, or days. This function calculates the number of days, months, or
years between two dates. It is provided for compatibility with Lotus 1-2-3.
This function takes the following arguments:
start_date — This is a date that represents the first, or starting,
date of the period. Dates may be entered as text strings within quota-
tion marks (for example, "2001/1/30"), as serial numbers, or as the
results of other formulas or functions (for example,
end_date — This is a date that represents the last, or ending, date of
unit — This is the type of information you want returned. The various
values for unitare shown in Table 11.7 .
Table 11.7. Unit Values Used by the
Table 11.7. Unit Values Used by the DATEDIF
Figure 11.44 compares the five types of basisof YEARFRAC with the six unit
values of DATEDIF. Each cell uses $A$1 as the start date and that row ’ s
column A as the end date.