Brian Dunning's FileMaker Custom Functions

AccurateAge ( start ; end )

Calculate Age in Years and Days Accurately

  Average rating: 5.0 (1 vote) Log in to vote

Tom G   Tom G - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
AccurateAge ( "7/4/1776" ; "2/13/2018" ) // age of the USA on date of this upload
  Sample output:
241 years 224 days

  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   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   Tom G
Nov 24, 2019
Just do:

GetasDate ( [EndDate] ) - GetasDate ( [StartDate] )

FileMaker automatically calculates the difference in number of days.
 
TA   TA
May 20, 2020
Thanks
Can you make it in
Years, Months, Days ?
 
Tom G   Tom G
May 21, 2020
Sorry, no, not at this time.
 

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 16 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: