Skip to main content
Solved

Rounding seconds to closest 15 seconds formula

  • November 20, 2020
  • 3 replies
  • 51 views

Forum|alt.badge.img+3

I need a formula to round seconds to the closest 15 second mark in the hh:mm:ss time format… i.e. say 1:01:10 needs to be rounded to 1:01:15 , say 0:34:20 rounded to 0:34:30, say 1:02:55 to 1:03:00
Hope someone can help as in excel I can use the MROUND formula but this is not in Airtable.

Best answer by Julian_E_Post

Hi Brisbane,
Say your original field is called “Duration”. Try creating a formula field with this:

ROUNDUP(Duration/15,0)*15

Then format the formula field to be h:mm:ss like the original. Keep in mind that this is not rounding to the closest 15 seconds, it is rounding up, which looks like what you’re going for. If you wanted to round to the nearest 15 seconds, you’d use this:

ROUND(Duration/15,0)*15

3 replies

Julian_E_Post
Forum|alt.badge.img+13
  • Inspiring
  • Answer
  • November 23, 2020

Hi Brisbane,
Say your original field is called “Duration”. Try creating a formula field with this:

ROUNDUP(Duration/15,0)*15

Then format the formula field to be h:mm:ss like the original. Keep in mind that this is not rounding to the closest 15 seconds, it is rounding up, which looks like what you’re going for. If you wanted to round to the nearest 15 seconds, you’d use this:

ROUND(Duration/15,0)*15


Forum|alt.badge.img+3
  • Author
  • New Participant
  • November 24, 2020

Hi Brisbane,
Say your original field is called “Duration”. Try creating a formula field with this:

ROUNDUP(Duration/15,0)*15

Then format the formula field to be h:mm:ss like the original. Keep in mind that this is not rounding to the closest 15 seconds, it is rounding up, which looks like what you’re going for. If you wanted to round to the nearest 15 seconds, you’d use this:

ROUND(Duration/15,0)*15


Thank you so much for the formula. Very much appreciated.

Cheers
Geoff


Julian_E_Post
Forum|alt.badge.img+13

Thank you so much for the formula. Very much appreciated.

Cheers
Geoff


You’re welcome! And if the formula works for you, don’t forget to mark it as the answer :slightly_smiling_face: