Brian Dunning's FileMaker Custom Functions

AddTimes ( Time1 ; Time2 )

Add two times, in h:mm:ss format, together

  Average rating: 4.7 (23 votes) Log in to vote

Bill Thurmes   Bill Thurmes
MDCA
http://www.miyotadca.com

Share on Facebook Share on Twitter

  Sample input:
AddTimes ( "28:35" ; "35:47" )
AddTimes ( "28:13" ; "31:30" )
  Sample output:
1:04:22
59:43

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

Time2 will be added to Time1
Entry format should be h:mm:ss, or mm:ss, or ss
Result will be in same format, dropping unneeded info from left.
If you want an h:mm:ss output, just drop the lines after t = Time (... and output t.
Primarily useful if the time format is/might be mm:ss
It now gives a negative answer if Time1 is before Time2

 

Comments

comment   comment, VR
Apr 10, 2014
Filemaker can add and subtract times natively.
 
Bill Thurmes   Bill Thurmes, MDCA
Apr 11, 2014
Thanks. I had needed something to add text that was in a mm:ss format, which Filemaker's native time addition doesn't deal with well. I've changed the script to use Filemaker's native capabilities.
 

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.