MindFusion.Wpf Pack Programmer's Guide
DATEDIF

Returns the difference in years, months, or days between the specified dates.

Syntax  Copy Code

DATEDIF( Date startDate, Date endDate, Text unit ) Number

Parameters

startDate
Required. The start date of the interval.
endDate
Required. The end date of the interval.
unit
Required. A string value specifying the type of information returned.

Remarks

The following table lists the possible values for the unit parameter:

Unit

Returns

"Y"

The number of complete calendar years in the period.

"M"

The number of complete months in the period.

"D"

The number of complete days in the period.

"MD"

The number of days from startDate to endDate. The months and years of the dates are ignored.

"YM"

The number of months from the month of startDate to the month of endDate. The days and years of the dates are ignored.

"YD"

The number of days from startDate to endDate. The years of the dates are ignored.

Example

Formula  Copy Code

=DATEDIF(DATE(2000,1,1),TODAY(),"d")

See Also

Function Reference
DAYS Function
DAYS360 Function