AccurateAge ( start ; end )
Calculate Age in Years and Days Accurately
Average rating: 5.0 (1 vote) Log in to vote
Tom G - Show more from this author |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
AccurateAge accurately calculates the period of time between any two dates and displayed in the form of "x years y days".
It also handles leap years in the start or end dates.
Can be used to determine age, shelf life, duration, time to expiration, etc. Basically any period between two dates.
Comments
KHALID SAID , K.D Nov 23, 2019 |
||
I want a function that calculates the number of days between two dates (only the number of days) | ||
Tom G Nov 24, 2019 |
||
Just do: GetasDate ( [EndDate] ) - GetasDate ( [StartDate] ) FileMaker automatically calculates the difference in number of days. |
||
TA May 20, 2020 |
||
Thanks Can you make it in Years, Months, Days ? |
||
Tom G May 21, 2020 |
||
Sorry, no, not at this time. | ||
Alireza Jul 1, 2020 |
||
hi and thank you how can i edit this function to split it into two calculations for the same record for alive people like above and for dead people it counts only the years and days that they lived thanks again |
||
Tom G Jul 1, 2020 |
||
You can do that by manipulating the parameter values. For example (DateofBirth and DateofDeath are both date fields in the person's record): Let ( [ start = DateofBirth ; end = If ( DateofDeath ; DateofDeath ; Get ( CurrentDate ) ) ] ; AccurateAge ( start ; end ) ) |
||
Tom G Aug 16, 2021 |
||
TA, Accurate Age YMD now available. Calculates age in years-months-days... | ||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.