Brian Dunning's FileMaker Custom Functions

AccurateAgeYMD ( start ; end )

Accurately calculate age between two dates in Years Months Days

  Be the first to rate this function Log in to vote

Tom G   Tom G - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
AccurateAgeYMD ( "7/4/1776" ; "9/1/2021" )
  Sample output:
245 years 1 month 28 days

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

This function accurately calculates the period between two dates in the format "Years Months Days". It can handle leap years, and adjusts for the different number of days of the month.

The example above shows the age of the USA from July 4, 1776, on September 1, 2021.

You can customize the output by modifying the Case statements at the end of the function.

 

Comments

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: