How to round time to the nearest hour?

0
I have used trimToHours but that always rounds down, I want to round up if it's over the 30 minute mark Any ideas?
asked
2 answers
4

Add 30 minutes and then round down to the nearest hour

answered
0

Instead of

trimToMinutes([%CurrentDateTime%]) > 30

try

parseInteger(formatDateTime([%CurrentDateTime%], 'mm')) > 30.

 

trimToMinutes will return a datetime, not an integer. 

answered