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

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

 

Comments

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 BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.