Skip to main content

Nested IF using DATEADD, not woking and no error!

  • November 18, 2019
  • 2 replies
  • 13 views

Help!

I have two fields, one contains a date, the other contains a frequency. Based on this I want to have a third field populated with the date of the next occurrence.

the first IF statement works and correctly sets the date, the second is ignored and no error. It just does not populate the field at all.

I am using the following:

IF(Recurrence = “Weekly”,DATEADD({Invoice Due Date},7,‘Days’,
IF(Recurrence = “Monthly”,DATEADD({Invoice Due Date},1,‘Month’))))

2 replies

Forum|alt.badge.img+19
  • Inspiring
  • November 18, 2019

You’re missing a closed parentheses after your first DATEADD() function. :slightly_smiling_face:

Try this…

IF({Recurrence} = "Weekly", DATEADD({Invoice Due Date}, 7, 'day'), IF({Recurrence} = "Monthly", DATEADD({Invoice Due Date}, 1, 'month')))

  • Author
  • New Participant
  • November 18, 2019

You’re missing a closed parentheses after your first DATEADD() function. :slightly_smiling_face:

Try this…

IF({Recurrence} = "Weekly", DATEADD({Invoice Due Date}, 7, 'day'), IF({Recurrence} = "Monthly", DATEADD({Invoice Due Date}, 1, 'month')))

Thank you! Not sure how I missed that but working good now :slightly_smiling_face: