Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Rounding Up By 15-Min Intervals

Featured Replies

Head ... ready to ... explode ...

Okay, my company bills clients in 15-minute increments. (If we work 8 minutes on the project, the customer gets billed for 15 minutes. If we work 17 minutes on the project, the customer gets billed for 30 minutes, and so on.)

I've created a Duration field that calculates (EndTime - StartTime) and tells me how long we *actually* worked on the project.

But the Cost field is set to calculate (Rate*Duration), which gives me a total billing amount that isn't right.

I've been pounding my head all day trying to figure out how to calculate this, and am just about ready to have a meltdown!

I started with this:

((( EndTime - StartTime)/3600)*4)*(Rate/4)

But I quickly discovered this only works if the difference of (EndTime - StartTime) works out to an increment of 900 seconds. Therefore, I need to always round (EndTime - StartTime) up to the next-highest 900-second increment.

Did anyone follow that? Or is there an easier way to do this that I'm not aware of?

As usual, thanks in advance for any advice.

Edited by Guest

Try:

Ceiling ( ( EndTime - StartTime ) / 900 ) * 900

The result here is Time.

Edited by Guest

Div(Time; 900) * 900 + Case(Div(Time; 900) <> Time/900; 900)

Take the integer value of the time divided by 900. That's the number of seconds in a 15 minute increment (since time is tracked in seconds). This will leave with the number of whole 15 minute increments which is multiplied by 900 seconds to turn it back into time. If the time was already an exact multiple of 15 minutes, don't add 900 additional seconds since it is already correct.

  • Author

Wow -- thanks for the quick response, comment.

So, what would that bit look like in context? Would it be this?

(Ceiling ( ( EndTime - StartTime )/900 )*900 ) * ( Rate/4 )

  • Author

Thanks, John. I'll try both of these solutions.

It depends on what the rate actually is. If it is hourly, then the billed amount is:

Rate / 3600 * Ceiling ( ( EndTime - StartTime ) / 900 ) * 900

or simply:

Rate / 4 * Ceiling ( ( EndTime - StartTime ) / 900 )

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.