We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Filtering dates AFTER the 20th of the current month

SnapperFlower
7 - Meteor

Hello, 

 

What would the best approach be to identify/filter dates after the 20th of the current month. Data set will have dates into the following month also (snip attached)

5 REPLIES 5
Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Hi @SnapperFlower ,

 

You can get the 20th of the current month with this expression, if the original date is cleansed to Date type.

Left([Date], 8) + "20"

Then you can simply use it to compare with the original date.

I hope this helps.

SnapperFlower
7 - Meteor

Thank you, I also have some data from prior months which will also need to be included as 'true' this formula.

Anything prior to the 20th of current month = true and anything after 20th of current month and into following month = false. The above formula isn't quite working for the June dates (or April)

PangHC
13 - Pulsar
[date] < DateTimeAdd(DateTimeFirstOfMonth(),19,"day")

datatimefirstofmonth = 1st day of this month

+ 19 to 20th of the month

Qiu
21 - Polaris
21 - Polaris

@SnapperFlower 
@Yoshiro_Fujimori  and @PangHC should work I believe, but to give some details with a sample flow.

0527-SnapperFlower.png

SnapperFlower
7 - Meteor

This worked, thank you. Much appreciated

Labels
Top Solution Authors