Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

If then Statement using Dates

lynnaberry
7 - Meteor

I am trying to create an if then statement using dates, but I keep getting the error "Malformed IF Statement".

 

Screen Shot 2020-05-15 at 12.01.01 PM.pngScreen Shot 2020-05-15 at 12.02.02 PM.png

5 REPLIES 5
RolandSchubert
16 - Nebula
16 - Nebula

Hi @lynnaberry ,

 

remove the ")" after [Service_Start_Date] in the first line, that means, change
IF [SERVICE_START_DATE]) <=

to 

IF [SERVICE_START_DATE] <=

 

Let me know if it works for you.

 

Best,

 

Roland

Bennel_Wilson
8 - Asteroid

Hi,

The way I'm reading the formula, in the first line, you've used a closing parenthesis after "[Service_Start_Date])" there is no opening parenthesis for that.

 

Correct that and let me know if that solves your problems.

 

If this helps, kindly mark it as solution

 

Regards

Benn

lynnaberry
7 - Meteor

Thank you for your help Roland! I removed it and now I get this error.

 

Screen Shot 2020-05-15 at 12.20.36 PM.png

RolandSchubert
16 - Nebula
16 - Nebula

Change [SERVICE_START_DATE] < 01-01-2020 to

[SERVICE_START_DATE] < DateTimeParse('01-01-2020', '%d-%m-%Y')

 

I assume, all other fields are of data type "DATE"?

lynnaberry
7 - Meteor

Yes that worked @RolandSchubert ! Thank you very much!

Labels