Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Creating a variable of type 'date'


I am trying to eliminate all rows of data that do not fall within a predefined reporting period. I have a column of data which has the 'Transaction date' in date format yyyy-mm-dd.


I now want to input 2 variables into my workflow, one that is 'Start date', one that is 'End date' then use a formula to eliminate rows if the date value doesn't fall within this range - is this possible?



Alteryx Partner
Alteryx Partner

You can use the filter tool to filter by date. Select within the tool the specific dates.


You have to be sure that the field is configured as a date, otherwise it won't work.


Thanks! I then had to convert the variable in my custom formula within the Filter tool using DateTimeParse, and then it read the date correctly.




Alteryx Partner
Alteryx Partner

Actually no, only setting the range is enough. Alteryx displays the dates as you want them to be visible, but the data for him is the same (as long as both have the same amount of data, meaning both have 'year month day' or 'year month day hour'.


Therefore, this should be enough:


[DateTime.entry] >= [DateTime.start] AND
[DateTime.entry] <= [DateTime.end]