Functions (all)

CalcDate

Function Name:
CalcDate
Description:
Calculates one date from another date. Takes the first data as a parameter, together with (optionally) a number of years, months and/or days. These can be positive or negative. For example, to find a date that is 10 months earlier than a given date, supply 0 years, -10 months, and 0 days as parameters.

This function takes leap years into account, and is to that extent affected by the changeover date for the Gregorian calendar as specified in Preferences; but it does not allow for the 10 or 11 days that were deducted from the calendar, owing to the changeover date for the Gregorian calendar, when adding or subtracting months and days.

Minimum FH Version:
4.0
No. of Parameters:
4
Return Type:
A date.
Parameter 1:
A date
Parameter 2:

Timespan in years (positive for later and negative for earlier). Defaults to 0 if not supplied.

Parameter 3:

Timespan in months (positive for later and negative for earlier). Defaults to 0 if not supplied.

Parameter 4:

Timespan in days (positive for later and negative for earlier). Defaults to 0 if not supplied.

Examples:

=CalcDate(%INDI.BIRT.DATE%, 0, -10)