Skip to main content
Solved

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

Best answer by Gisele_Noel

ScottWorld wrote:

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.


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

View original
Did this topic help you find an answer to your question?

5 replies

ScottWorld
Forum|alt.badge.img+33
  • Brainy
  • 8826 replies
  • November 22, 2020

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.


  • Author
  • New Participant
  • 2 replies
  • Answer
  • November 22, 2020
ScottWorld wrote:

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.


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


ScottWorld
Forum|alt.badge.img+33
  • Brainy
  • 8826 replies
  • November 22, 2020
Gisele_Noel wrote:

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.


  • Author
  • New Participant
  • 2 replies
  • November 22, 2020
ScottWorld wrote:

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!


ScottWorld
Forum|alt.badge.img+33
  • Brainy
  • 8826 replies
  • November 22, 2020
Gisele_Noel wrote:

Fantastic insights - THANK YOU!


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


Reply