Brian Dunning's FileMaker Custom Functions

Quarter24Hrs ( Timestamp )

Returns Timestamp, rounds time to quarter hour without seconds

  Average rating: 3.9 (20 votes) Log in to vote

Omelyan Burtnyk   Omelyan Burtnyk - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
Quarter24Hrs ( 1/13/2017 11:37:58 AM )
  Sample output:
13JAN17 11:45

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

The number of hours worked by non-exempt employees are calculated using the quarter-hour rounding method. This means that an employee’s arrival and departure times are rounded to the closest quarter of the hour when calculating the timesheet. Using 8:00 AM as an example, employees will be paid from 8:00, 8:15, 8:30, 8:45 or 9:00.



comment   comment, VR
Jul 2, 2016
I don't think this works.

Anyway, to round a timestamp to the nearest quarter hour, you only need to do:

Round ( timestamp / 900 ; 0 ) * 900
Omelyan Burtnyk   Omelyan Burtnyk
Jul 2, 2016
Thanks for your comment Mr. VM
I think you meant:
GetAsTime ( Round ( Get ( CurrentTime ) / 900 ; 0 ) * 900 )

because Timestamp function has 2 parameters date and time
Timestamp ( date ; time )
Omelyan Burtnyk   Omelyan Burtnyk
Jul 2, 2016
and my example working properly
Omelyan Burtnyk   Omelyan Burtnyk
Jan 13, 2017
Made changes to prevent doublings

Log in to post comments.


Note: these functions are not guaranteed or supported by 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: