Mar 13, 2018 06:28 PM
I need some help if anyone could be of assistance. I’m trying to do an if statement to add days to a previous date field. I got it to add days already with DATEADD({Date Violated}, 60, ‘DAYS’).
However, there is a small change where I need it to add 30 days in some cases with another field that is a single select. The code I’ve tried so far is as follows.
IF(Violation=‘Discipline’, DATEADD({Date Violated}, 30, ‘DAYS’), DATEADD({Date Violated}, 60, ‘DAYS’)
I get an error, and I’m not entirely sure what I’m doing wrong.
Mar 13, 2018 06:59 PM
So, I figured it out. Tried making a simpler statement to see where I was going wrong. Slowly added on to it.
As from what I had seen in most other threads, it’s a lack of parenthesis. I ended up with this.
IF({Violation}=“Discipline”, DATEADD({Date Violated}, 30, ‘DAYS’), DATEADD({Date Violated}, 60, ‘DAYS’))
Mar 14, 2018 04:03 AM
Yes, that formula misses the closing parentheses of the IF.