Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Date Filter

furlonla
8 - Asteroid

Hi, 

 

I am trying to filter for dates outside of a certain period (2019-12-01 - 2020-11-2020). I have attached a screenshot of my filter below. 

furlonla_0-1611089499068.png

My output seems to have dates in and out of tat period. Any help would be much appreciated!

 

Thanks!

 

8 REPLIES 8
AngelosPachis
16 - Nebula

Hi @furlonla ,

 

So out of the T output anchor of your filter tool you should only have dates falling within the period from beg Dec 2019 to end Nov 2020.

 

If you want to filter for dates outside that period, then maybe have a look at the "F" output anchor. I mean, I can't seem to find what's wrong with your expression, it looks correct to me.

hroderick-thr
11 - Bolide

watch your data types on both sides of the equation.

An Alteryx date will be formatted YYYY-MM-DD HH:MM:SS

Try adding the HH:MM:SS to your "literal" 

Adding either a ToDate() or ToString() around one side of the equation or the other may help too.

 

Emil_Kos
17 - Castor
17 - Castor

Hi @hroderick-thr,

 

I was initially thinking that the issue might be with incorrect data type but I am not sure if he could use >= on a string data type. 

AngelosPachis
16 - Nebula

Tried that out before my earlier post @Emil_Kos , it appears you can and Alteryx will return the correct results after the filter

 

AngelosPachis_0-1611090494296.png

 

furlonla
8 - Asteroid

I was having a blonde moment I was reading the F anchor as yyyy-dd-MM, so thought something was going wrong but it's actually working! Thanks!

furlonla
8 - Asteroid

furlonla_0-1611090804251.png

Yeah I have had to update the date column from string to date format - don't think there is a quicker way to do this with my Alteryx capabilities haha!

AngelosPachis
16 - Nebula

Is the date column created within the formula tool @furlonla ?

 

If yes, then you can select the data type for the column created in each expression. Underneath the expression box, there is a drop-down menu which allows you to define the data type; it's commonly set to be a string, but you can change that to a date.

 

Lovely documentation of the workflow btw, probably more important than forming the date field in less tools. Keep it up, it's a great habit to pick up early on.

furlonla
8 - Asteroid

The report I am using has two different date formats some are American and some European - so I have two Date Time tools which update and format into 'Date' format. Then the formula tool makes this one column, and then I select the one relevant date column.

 

Thanks, yeah the documentation hopefully will make it easier for other people to run!

Labels