Calculate dates based on text in another field

I want to calculate a deadline that is 30 days prior an App Release date for daily content. But I also want a deadline that is 60 days after the App Release for project types that are not daily.

The 1st step of my goal works correctly with this formula…

DATEADD({App Release (from Master List)}, -30, ‘days’)

Here is an IF statement attempt to include the 60 day delay for all other content that does not work. What am I doing wrong?

IF ({Project Type (from Master List)} = “DAILY Meditation”), DATEADD({App Release (from Master List)}, -30, ‘days’), DATEADD({App Release (from Master List)}, +60, ‘days’)

I’ve never seen + and - used in the DATEADD formula before, but that’s very cool to know that - works. Not sure if + works… I would get rid of that.

1 Like

I changed my base so all the references were on the same sheet (so the reference field names changed). But you were correct that the + was an issue, but I also needed to use single quotation (’) marks, not double quotations (") around the exact phrase the IF statement was looking for. THANK YOU for your help!!!

Here’s my working formula for deadlines now:

IF({Project Type} = ‘DAILY Meditation’, (DATEADD(Publish, -30, ‘days’)), (DATEADD(Publish, 60, ‘days’)))

1 Like

Glad you’ve solved it! Actually, double quotation marks work just fine. It’s possible that you were using curly quotes instead of straight quotes. Annoyingly, Airtable’s formula field doesn’t recognize curly quotes at all, which is one of the top problems that people have with Airtable’s formula field.

1 Like

Fantastic insights - THANK YOU!

1 Like

You’re welcome! Glad I could help! :slight_smile:

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