How to round a time to the nearest 15 minutes?

Hi, I wish to round a time selected by the user to the nearest 15 minutes (e.g. 18:15, 18:30, 18:45 etc.). I’m using the following to add a slider’s value to the current time to get a calculated time, currently showing to the nearest minute of course:


Any ideas? Thanks!

Hi @andrew36 :wave: !

Why don’t you make a constraint before your user select the time?
Allowing them to select just the times that you want? Like 18:15, 18:30, 18:45…

Can you give us more detais about what you are doing?
How your user select the desired time? Is it using a slider?

Thanks for the suggestion. This wouldn’t fit the user’s need though.

I actually worked it out. I needed to put the ‘rounded to’ right after the current time, not at the end of the expression.



1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.