If function using dates

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 :slight_smile:

as always thanks in advance and stay safe guys

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

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

1 Like

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.