Converting and rounding the new duration field to decimal


#1

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.


#2

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).


#3

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