Help

If function using dates

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

Dear airtable community, i am looking for a function that:

if a certain cell is modified, i get a value in a ‘last modified time’ field. after getting that, i want to know the work day difference between my ‘last modified time’ field and a ‘order date’ field. if the mentioned cell at first hasn’t been modified yet, i won’t get an return for the ‘last modified time’ field and so i want to have a blanc for the difference in work days.

the function i was able to set up for now is:

IF({found at},WORKDAY_DIFF({order date},{found at}, BLANK())

i’m aware of the fact that the point of formulating the conditon, isn’t fullfilled, but i have no idea what else to put there. if there’s an easier way of fullfilling my need than the if function, please. let me know :slightly_smiling_face:

as always thanks in advance and stay safe guys

1 Solution

Accepted Solutions
Justin_Barrett
18 - Pluto
18 - Pluto

Your formula as written is missing a closing parenthesis for the WORKDAY_DIFF() function. It should look like this:

IF({found at}, WORKDAY_DIFF({order date}, {found at}), BLANK())

You can also drop the BLANK() function on the end. Airtable will automatically leave the field empty if the condition fails. That reduces your formula to just this:

IF({found at}, WORKDAY_DIFF({order date}, {found at}))

As for the condition itself, your formula works just fine. Putting a field reference alone in that space will return True if the field contains anything, and False if it’s empty. (Number fields are the only type that break this rule because a 0 in a number field makes it not empty, but 0 is also equivalent to False.)

See Solution in Thread

2 Replies 2
Justin_Barrett
18 - Pluto
18 - Pluto

Your formula as written is missing a closing parenthesis for the WORKDAY_DIFF() function. It should look like this:

IF({found at}, WORKDAY_DIFF({order date}, {found at}), BLANK())

You can also drop the BLANK() function on the end. Airtable will automatically leave the field empty if the condition fails. That reduces your formula to just this:

IF({found at}, WORKDAY_DIFF({order date}, {found at}))

As for the condition itself, your formula works just fine. Putting a field reference alone in that space will return True if the field contains anything, and False if it’s empty. (Number fields are the only type that break this rule because a 0 in a number field makes it not empty, but 0 is also equivalent to False.)

kxr1m
5 - Automation Enthusiast
5 - Automation Enthusiast

great that’s it, thank you so much! ❤️ stay safe and have a nice day, kind regards karim