Help

Formula including conditions on Duration field type

Topic Labels: Formulas
1105 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Chris_Yabu
4 - Data Explorer
4 - Data Explorer

Hi all,
Ok I’m fairly new to Airtable so this could be an easy topic to solve for many, but not for me yet…

I’ve got a Duration type field in a table called “Travel time”, which contains the time it took an operator to get to his assigned work location. The format of the field is “h:mm”.
I’d like to create another field called “Paid minutes”, which basically would contain the total minutes of the Travel time minus 60 minutes, because that would be the actual duration of time he can claim for any overtime pay. If the Travel time is less than 60 minutes, the value in the Paid minutes should be zero.

So the idea for the formula would be something like:
IF(MINUTE({Travel time})>60, MINUTE({Travel time})-60, 0)
…but as you might know, the MINUTE function is for datetime field and does not work for duration.

Can anyone help me solve the issue?
Thanks in advance!

2 Replies 2

Hi @Chris_Yabu a duration divided by 60 gives the number of minutes, e.g.:

Duration/60

So you should be able to use this where you have MINUTE(Duration)

JB

Hi Jonathan,
Great, worked perfectly. :thumbs_up:
Thanks a lot!
Chris