Brian Dunning's FileMaker Custom Functions

ElapsedTime_CFpub ( tsStart ; tsEnd )

Elapsed Time in Years, Months, Days, Hours, Minutes and Seconds

  Average rating: 4.2 (33 votes) Log in to vote

James Hea   James Hea

Share on Facebook Share on Twitter

  Sample input:
ElapsedTime_CFpub ( 10/15/2007 11:30 PM , 10/24/2007 6:57:58 PM )
  Sample output:
0 years 0 months 8 days 19 hours 27 minutes 58 seconds

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

Function: ElapsedTime_CFpub ( tsStart ; tsEnd).
Type: Timestamp calculation returning a text result.
Purpose: To calculate in human readable form the elapsed time between two events using years, months, days, hours, minutes and seconds.
Constraints: The function uses 30 days for months and 12 months for years resulting in a 360 day year.
Options: The function can be rewritten without the years and months and is perfectly accurate for elapsed time vs calendar time.
Modifications: The function can have a third parameter to extract any one time period value or to supply the text form.
Author: James Hea



Lee Smith   Lee Smith
Feb 4, 2010
This CF makes me a year older than I am?
Edward Souza   Edward Souza, Sao Paulo, Brazil
Feb 11, 2010
Lee, perhaps the date on your birth certificate is wrong. :)
Actually, you are right. I got some weird results when using this CF, so I re-wrote it.

Log in to post comments.


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

Under construction. Email me your wish list for improvements.