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 - Show more from this author
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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 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:

Under construction. Email me your wish list for improvements.