Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Create IF Statement with Date column

SwizzKZ
5 - Atom

Hello all,

 

I'm new to this community and very exited in learning this new tool.

 

Can someone help me with the IF statement ?

 

I have a date column in mm/dd/yyyy format (string). I need to create a new field , in excel  the formula would be :

 

=IF(DateColumn="","NA", IF(DateColumn<Today()),"Expired",DateColumn)

1 REPLY 1
Luke_C
17 - Castor
17 - Castor

Hi @SwizzKZ 

 

You'll need to convert the date field to the alteryx date format (yyyy-mm-dd). You can do this separately or as part of the formula:

 

IF isempty([DateColumn])

Then 'NA'

Elseif Datetimeparse([DateColumn],'%m/%d/%Y') < Datetimetoday()

Then 'Expired'

Else [DateColumn]

Endif

Labels
Top Solution Authors