Help

Converting and rounding the new duration field to decimal

4600 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Florin_Mehedint
5 - Automation Enthusiast
5 - Automation Enthusiast

Before the duration field was added, I was using “Start” and “Stop” fields with this formula:

IF( AND(NOT({Start}), NOT({Stop})), "", IF( {Stop}, ROUND((DATETIME_DIFF(Stop, Start, 'minutes') / 60) * 4 , 0) / 4 , ROUND((DATETIME_DIFF(NOW(), Start, 'minutes') / 60) * 4 , 0) / 4 ))

This gave me a nicely rounded decimal number for billing purposes.

I’d like to use the new duration field to eliminate a step here, but can’t figure out how to convert that fields value.

3 Replies 3

I believe the duration field passes it’s value as Seconds to any formulas, so if you divide your duration field by 3600, it will give you the duration in Hours - then use formatting to get your decimal to the precision of your choosing. (I think that should get you where you want).

Ha! I was just about to ask a similar question. Thanks again Jeremy!

I know you wrote this 3 years ago, but thank you man. You just saved my bacon.