Brian Dunning's FileMaker Custom Functions

NumberOfYears

Returns decimal representing number of years between two dates. Accurately accounts for leap year without adding .25 days for non leap years.

  Average rating: 4.8 (24 votes) Log in to vote

Lance Hallberg   Lance Hallberg
TradeSchool Inc.
http://www.tradeschoolinc.com

Share on Facebook Share on Twitter

  Sample input:
NumberOfYears ( Date( 12; 1; 2015 ) , Date( 1; 1; 2018 ) )
  Sample output:
2.0876712328767123

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

This function returns the decimal number of years between two dates. It accurately accounts for leap years without adding .25 days onto non leap years.

 

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: