In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Filter Function - Dynamic Date Range

ahernandez39
5 - Atom

Hey Everyone! 

 

I am new to using Alteryx so any help would be appreciated! Currently we have a workflow that has the "Filter" tool to capture travel dates and remove the ones not needed. The date range is dynamic and we currently are using the script below. 

 

[Planned Departure Date & Time] >=DateTimeNow() AND [Planned Departure Date & Time]<=DateTimeAdd(DateTimeNow(),7,"days")

 

This script targets Planned Departure Date & Time for the seven days in the future when the workflow is run. What i need is to add something that will also capture "today's date". For example when i ran the workflow this morning it capture dates 2/19-2/25. I need it to capture dates 2/18-2/25. does anyone have any advice on what to change on the script?

 

Thank you in advance! 

2 REPLIES 2
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @ahernandez39,

 

Could you try wrapping your DateTimeNow() function in a ToDate() function:

 

[Planned Departure Date & Time] >= ToDate(DateTimeNow()) AND [Planned Departure Date & Time]<=DateTimeAdd(DateTimeNow(),7,"days")

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Regards,

Jonathan

ahernandez39
5 - Atom

I just tried it and it worked! thank you so much @Jonathan-Sherman 

Labels
Top Solution Authors