Brian Dunning's FileMaker Custom Functions

AGE ( BirthDate )

Calculate the correct Age :)

  Average rating: 4.3 (38 votes) Log in to vote

meddved   meddved
meddved
www.meddved.bg

Share on Facebook Share on Twitter

  Sample input:
AGE ( "14/04/1981" )
  Sample output:
29

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

This function calculates the correct age.
Auto-correction for leap years.

 

Comments

comment   comment, VR
Apr 13, 2011
"This function calculates the correct age."

No, it doesn't: a person born in 1900-03-15 is not yet 100 years old in 2000-03-14.


Why not do the simple thing:

Year ( today ) - Year ( DOB ) -
( today < Date ( Month ( DOB ) ; Day ( DOB ) ; Year ( today ) ) )
 
Daniel A. Shockley   Daniel A. Shockley, New York, NY
May 4, 2011
Try the following instead:
http://www.briandunning.com/cf/518

It works, even on the birthday anniversaries and when dealing with leap years. It also gives you more detail and options, if desired.
 
David   David, Madrid (Spain)
Sep 21, 2016
thank you very much
It has been very useful for my application.
 

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.

Under construction. Email me your wish list for improvements.