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
Átomo

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 RESPONDER 1
Luke_C
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

Enquetes
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Rótulos