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

Under construction. Email me your wish list for improvements.