Microsoft Office Tutorials and References
In Depth Information
Syntax
Syntax
=DATEDIF(start_date,end_date,unit)
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
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,
DATEVALUE("2001/1/30")).
end_date
end_date This is a date that represents the last, or ending, date of
the period.
unit
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
DATEDIF Function
Function
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.
Search JabSto ::




Custom Search