Alteryx Designer Desktop Discussions

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

Date Comparison

crtakacs
8 - Asteroid

Hello - I apologize for the simple question but I'm trying to compare the date of the column with current date in order to determine whether a row needs to be removed. 

 

I have a column named "Beg Time" with dates that have been changed to the "Date" type (mm/dd/yyyy) in the Select tool. I would like to determine if the month and year of the beg time is less than the month and year of the current date, so that I may exclude this row from the data. For example a current date of 5/7/19 would exclude a beg time of 4/1/19, but would not exclude a beg time of 5/1/19. 

 

I've tried a few different tools (DateTimeParse, Formula) but I keep getting invalid format errors. 

 

Any help would be greatly appreciated. 

2 REPLIES 2
Thableaus
17 - Castor
17 - Castor

Hi @crtakacs 

 

Use Filter Tool with this Formula:

 

 ToNumber(DateTimeFormat([Beg Time],"%Y%m")) >= ToNumber(DateTimeFormat(DateTimeNow(),"%Y%m")) 

 

Note: Your beg time field should be in date format.

 

Cheers,

 

 

crtakacs
8 - Asteroid

That worked! Thanks! 

Labels