Help

Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Adding duration with formula

Topic Labels: Formulas
39 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, I am having to add hours ("duration") to a field and outputting to a new field where a formula would be developed, however, I am not sure how to format the formula for the duration; here is my formula:

 
IF(
FIND("Algebra I", {Requires Additional Hours?}), {30:00},
SUM({Total Hours Required}{30:00})
)
 
"{30:00}" in both instances comes out red, meaning it is wrong, however, what I need to do is add 30 hours to the "{Total Hours Required}" field. Basically, if Algebra 1 is found in this drop-down menu "{Requires Additional Hours?}", it takes the value within "Total Hours Required" and is supposed to ad 30 hours and output it to this field. If Algebra 1 is not found, it stays at 30 hours, hinting at the first "{30:00}" in the IF() formula.
 
Thanks in advance!
2 Replies 2

Juan,

Duration is stored in seconds, so if you want to add 30 hours, add 108,000. Also, make sure your field's formatting is set to Duration.
Screen Shot 2023-01-24 at 3.40.25 PM.pngScreen Shot 2023-01-24 at 3.42.22 PM.pngScreen Shot 2023-01-24 at 3.41.48 PM.png

Hi, looks like you are putting the hours you want to add in curly brackets which Airtable sees as a field name.  Try removing the brackets and just use the number 30.