Whole document tree
    

Whole document tree

DATEDIF

DATEDIF

Name

DATEDIF -- 

Description

DATEDIF returns the difference between two dates. @interval is one of six possible values: "y", "m", "d", "ym", "md", and "yd".

The first three options will return the number of complete years, months, or days, respectively, between the two dates specified.

"ym" will return the number of full months between the two dates, not including the difference in years.

"md" will return the number of full days between the two dates, not including the difference in months.

"yd" will return the number of full days between the two dates, not including the difference in years.

This function is Excel compatible.

Examples

DATEDIF(DATE(2000,4,30),DATE(2003,8,4),"d") equals 1191.

DATEDIF(DATE(2000,4,30),DATE(2003,8,4),"y") equals 3.

See also

DATE.