Help

Calculate dates based on text in another field

Solved
Jump to Solution
1083 5
cancel
Showing results for 
Search instead for 
Did you mean: 
Gisele_Noel
5 - Automation Enthusiast
5 - Automation Enthusiast

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

1 Solution

Accepted Solutions
Gisele_Noel
5 - Automation Enthusiast
5 - Automation Enthusiast

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

See Solution in Thread

5 Replies 5

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.

Gisele_Noel
5 - Automation Enthusiast
5 - Automation Enthusiast

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

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.

Fantastic insights - THANK YOU!

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