min($time) < 15 ; $closest15 = 0;
15 < min($time) < 30 ; $closest15 = 15;
$time to save = time(hour($time) ; $closest15 ; 0)
This will work as script steps, but can redone to a calculation with the Let function. And of course you need all four minutes, this was just to give you the idea not do the work for you. ;)
Thank-you for the help. I want to get it working in a calculation field for time in and out but I have trouble with the Let funciton. For the TimeIn field, on the layout it is set to get(currenttime) when pressed, then I was thinking of making TimeIn a calculation field. Where am I going wrong in the calculation:Let([$Time = get(currenttime);$closest = 0;]Case(Minute($Time) < 15; $closest= 0;15 ≤ Minute($Time) < 30; $closest = 15;30 ≤ Minute($Time) < 45; $closest= 30;$closest = 45)TimeIn = time($time;$closest;0))
I suggest searching the Knowledge Base (see link at top of page). There's an article in there somewheres that documents a calculation for rounding to the nearest 15 minutes in an elapsed time calculation.
If you use a calculation field to capture the current time, make it unstored and do not try to set up a field of type time with an auto-enter calc to do it.