Free Trial

Alteryx Designer Desktop Discussions

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

Date not filtering

Bobbins
8 - Asteroid

Afternoon All,

 

I have a Date Column with the format YYYY-MM-DD but Alteryx will not filter on it. I thought this was the correct date format?

What have I missed?

 

Example data attached

 

Thanks 

10 REPLIES 10
OllieClarke
15 - Aurora
15 - Aurora

Hi @Bobbins 

 

You're filtering to 2023-02-21, but the max date in your data set is 2023-01-22

 

If you change your filter to 2023-01-21 then you get data out:

OllieClarke_0-1676983663013.png

 

Hope that helps,

 

Ollie

 

Christina_H
14 - Magnetar

It is the correct date format and your filter works fine, you've just chosen a date that doesn't exist in your data!  I've just changed the month from Feb to Jan

Christina_H_0-1676983698104.png

Bobbins
8 - Asteroid

*Facepalm* Thank  you @Christina_H  & @OllieClarke 

Well that answers one problem, but are you able to get this to work? Because it doesnt for me but i am guessing i could be missing something again?

[Date] >= DateTimeAdd(DateTimeToday(), -1, "days")

Thanks

Christina_H
14 - Magnetar

Is that for the filter again?  You're asking whether a date is later than three days before itself, and all dates will return true.  What are you trying to do?

Bobbins
8 - Asteroid

@Christina_H  I am trying to filter for the last 3 days


Trying to use the suggested Alteryx help from here and using this code: DateTimeAdd(DateTimeToday(), -1, "days") should return yesterday’s date according to help

Christina_H
14 - Magnetar

I think you've updated your formula, and it should work now if you change the -1 to -3.  But again, the dataset doesn't contain any data from the last 3 days so you won't get any results.

Bobbins
8 - Asteroid

I forget, I am in February, keep thinking I am still in January!

Sorry @Christina_H 

OllieClarke
15 - Aurora
15 - Aurora

@Bobbins 

[Date] >= datetimeadd(datetimetoday(),-3,'day')
AND [Date]<=datetimetoday()

This will filter to dates in the last 3 days, but there are no dates in your data set that recent

 

Ollie

Bobbins
8 - Asteroid

@OllieClarke  yep d**bass me forgot I am no longer working in January!

Labels
Top Solution Authors