Brian Dunning's FileMaker Custom Functions

RoundTime ( Duration ; Increment )

Rounds time to the nearest specified increment.

  Average rating: 3.8 (40 votes) Log in to vote

Brian Dunning   Brian Dunning - Show more from this author
BrianDunning.com
https://www.briandunning.com

Share on Facebook Share on Twitter

  Sample input:
RoundTime ( 00:18:00 ; 00:15:00 )
  Sample output:
00:15:00

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

This function takes an input from a time field ("Duration") and rounds it to the nearest time increment ("Increment"). A common example would be billable time: If you work for an hour and 35 minutes, and you bill in 20 minute increments, you would enter this:

RoundTime ( 01:35:00 ; 00:20:00 )

The function will return 01:40:00. It rounds up or down in the standard way: once you reach half the increment, it rounds up; less than half rounds down. Enjoy...

 

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 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.