Help

Round a time up to nearest 30 seconds

Topic Labels: Formulas
799 2
cancel
Showing results for 
Search instead for 
Did you mean: 
edclarke
4 - Data Explorer
4 - Data Explorer

Hi

I have a field called {Total Duration} where the user enters the length of a video in h:mm:ss format. This formula is going to be used to calculate the costs of video editing. We charge in 30 seconds units. 1-30 seconds is charged as one unit, but 31-60 is charged as two units.

I have been using the following when {Total Duration} was set as a simple number field

CEILING({Total Duration} /30) * 30
This almost works. If I enter 32 it rounds up to 60, which is what I want, but if I enter 31 it rounds down to 30. 
 
Any ideas how I can solve this?
 
2 Replies 2

I was unable to reproduce the issue. Your formula worked fine for me.

This is unusual. Does this happen consistently if you type 31 seconds in multiple rows? Does the issue happen when you type one second? Can you share a screenshot? It might be a floating point issue, but that seems unlikely.

edclarke
4 - Data Explorer
4 - Data Explorer

How strange! I've just deleted the column, then set it up again and now its working...

 

Sorry for wasting your time and thank you for the help!