Days_Diff ( date1 ; date2 )
Days difference part between two dates.
Average rating: 4.0 (32 votes) Log in to vote
Ron Smith - Show more from this author |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
/* Days_Diff ( date1 ; date2 )
This code find the days part of a years-months-days age calculation.
You only need to enter the two dates in any order.
This code takes in the account the 'end of month paranoia' that comes from
different lengths of months. For example, the ages for the following birth dates
are the same.
Birth Current Date Age
12/28/2006 3/1/2007 0 years 2 months 1 day
12/31/2007 3/1/2007 0 years 2 months 1 day
This occurs because February has only 28 days. Though at first this seems wrong,
think about how you would explain how old your child is in months and days. If you
were calculating the total number of days, however they of course differ. This highlights
the ideosyncracy of using a years, month, and days discreption of age. Still it is useful
in the context of ages in the managing vaccinations in kids or studying ages in
genealogy.
*/
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.