Brian Dunning's FileMaker Custom Functions

Age ( date )

Simple but eefective calculation of years since a certain date

  Average rating: 4.1 (28 votes) Log in to vote

Rob Mertens   Rob Mertens - Show more from this author
Alku BV
http://www.alku.nl

Share on Facebook Share on Twitter

  Sample input:
Age ( Birthdaydate )

Birthdaydate with a value of 5-3-1969 in my case
  Sample output:
43

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Just looks at the current day of the year, if its past the day of the year of the given date the years passed is the current year minus the given year else it's a year less

 

Comments

 
Mar 20, 2012
Sorry, but this fails when the start year is a leap year and the current year is not a leap year. Sometimes simple is not necessarily effective ;)
 
Kieren MacMillan   Kieren MacMillan, Toronto
Mar 21, 2012
A totally accurate and yet very simple way is demonstrated in my YearsAsInteger function (http://www.briandunning.com/cf/79).

Hope this helps!
Kieren.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: