Alteryx Designer Desktop Discussions

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

Filtering the Current Date

KamenRider
11 - Bolide

HI guys,

 

I would like to ask for your ideas on how I can  filter out or exclude the current date (like today which is 10-04-2022) every time I run the workflow. I have tried a lot of way like using the formula tool (IF [DATE] = DATETIMETODAY() THEN "00/00/000" ELSE [DATE] ENDIF" then follow a filter tool but it is not working. 

 

For below example as attached, i would like date to return to 10-03-2022 and 10-02-2022 since it is not the current date

 

 

 

Please advise.

 

Kamen

6 REPLIES 6
DavidSkaife
13 - Pulsar

Hi @KamenRider 

 

Here you go, simple formula in the filter tool does the trick:

 

DavidSkaife_0-1664877758523.png

 

DataNath
17 - Castor

Hey @KamenRider, you could use a Filter tool with the following expression - Alteryx recognises dates in YYYY-MM-DD format and so the DateTimeParse() function is just used to get your incoming dates into this format. After that, it just checks whether or not they're the same as today's date by using the DateTimeToday() function. You're interested in what comes out of the top (True) anchor i.e. dates that aren't equal to today:

 

DateTimeParse([Date],'%m-%d-%Y') != DateTimeToday()

 

DataNath_0-1664877825944.png

 

As you can see, today's date has been excluded and filtered out through the bottom (False) anchor:

 

DataNath_1-1664877883658.png

Emmanuel_G
13 - Pulsar

@KamenRider 

 

In attachement the way of doing that.

 

Emmanuel_G_0-1664880671476.png

 

KamenRider
11 - Bolide

Thanks @DavidSkaife , @Emmanuel_G , @DataNath  for your ideas.

 

 

spina
5 - Atom

Anyone know how to filter the Datetimetoday but with a specific time? 

KamenRider
11 - Bolide

Hi Spina,

 

Good day,

 

Can you please cite an example, provide us screenshots and/or share your workflow so anyone here can help you more?

 

Thanks,

 

Kamen

Labels