Help

Adding duration with formula

Topic Labels: Formulas
Solved
Jump to Solution
1939 2
cancel
Showing results for 
Search instead for 
Did you mean: 
JuanDSantos
5 - Automation Enthusiast
5 - Automation Enthusiast

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!
1 Solution

Accepted Solutions
Ron_Daniel
8 - Airtable Astronomer
8 - Airtable Astronomer

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

See Solution in Thread

2 Replies 2
Ron_Daniel
8 - Airtable Astronomer
8 - Airtable Astronomer

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

bruceconsulting
7 - App Architect
7 - App Architect

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.