Help

Round Off the Time Duration to the the next higher hour no.

Topic Labels: Dates & Timezones Formulas
160 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Nevan
4 - Data Explorer
4 - Data Explorer

I am a beginner and wanted to make a few custom changes through formula’s and other customisation’s. I need help with the two doubts below. Also take reference from the two photos. 
1. How do I setup the “Hours” formula field such that even if its 10 mins more than a perfect hour it will round it off to 2 hrs and so on for any more amount of time.
2. In the first photo, is it possible for the “End Time” to solely be a time field Instead of Date and Time.
Would be really helpful I could get some solid advice on this!

1 Reply 1

re: 1. How do I setup the “Hours” formula field such that even if its 10 mins more than a perfect hour it will round it off to 2 hrs and so on for any more amount of time.

Try:  

ROUNDUP(
  DATETIME_DIFF(
    End,
    Start,
    'minutes'
  ) / 60,
  0
)

 Screenshot 2024-03-28 at 12.25.36 PM.png
---
re: 2. In the first photo, is it possible for the “End Time” to solely be a time field Instead of Date and Time.

You could probably do something crazy with a single line text field that you input the time into (e.g. 13:30), and then use a formula field to help you calculate stuff; might be more trouble than it's worth though