I have searched for hours and could not find an answer that works.
Here is my query with specific table names and irrelevant data starred out.
---------------------------------------------------------------------------------------
Select ******, ******, ******, ...suggested_Due_Date
From *********Table Name
Where *****=*****
and ....suggested_Due_Date >= today-7 days and <= today+83 days
------------------------------------------------------------------------------------------
I've tried several combinations after much searching with only errors coming from an issue with the code for the date range.
Solved! Go to Solution.
is your [Due-Date] a date field in Alteryx? if so - use a customer filter with [suggested_Due_Date]>=datetimeadd(datetimenow(),-7,"days") and [suggested_Due_Date]<=datetimeadd(datetimenow(),83,"days")
This did not fix my error. "Error is Analysis Exception: default.datetimenow() unknown."
my data source is datetime
I wanted to also specify I am doing this in the SQL editor and not using the filter tool on the canvas.
What type of SQL are you using. This is really a SQL query question and has 0% connection to Alteryx - other than that you are using Alteryx to execute the query.
Something like CAST( GETDATE() AS Date ) will get you today's date and something like DATEADD(day, -7, AST( GETDATE() AS Date ) ) might get you one of your values. You'll need two clauses in your Where statement - and an AND to join them. You are not looking for value > and < you are looking for value > and value <.