Brian Dunning's FileMaker Custom Functions

FiveRountTS ( mytimestamp )

Rounds timestamp to the nearest 5 minute mark

  Average rating: 4.3 (7 votes) Log in to vote

Jeff Morrison   Jeff Morrison - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
FiveRoundTS ( 1/1/2017 01:03:00 )
  Sample output:
1/1/2017 01:05:00

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

Ronds up or down to the nearest 5 minute mark based on the timestamp used.
1/1/2017 01:03:00 returns 1/1/2017 01:05:00
1/1/2017 14:42:02 returns 1/1/2017 14:40:00
1/1/2017 23:58:20 returns 1/2/2017 00:00:00



unix   unix, Japan
Jan 9, 2017
This returns timestamp as text.

To get it, simply divide it with 300 (5min in seconds) then round.
GetAsTimestamp ( Round ( mytimestamp / 300 ; 0 ) * 300 )

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 16 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: