Hi,
I have searched for this topic in the community and am not finding what I am looking for. I am also very new to Alteryx advanced functions and have learned this tool on the job.
I have a date field ABC that looks like this: '2017-07-07 00:40:08'
This field is being used in a query but currently I am hard coding it. eg. where ABC >= '2017-07-07'. But I want to automate it.
I am trying to add a logic to my query to look at current date and subtract 2 months from it. So basically I want to start from July 7th.
I researched and found that there is a dynamic input tool that may suit my purposes. I have different things like follows:
1. Create a new field Mydate which is defined as DATETIMEADD([DateTimeNow],-60,"DAYS")
3. Then in the query use the following clause:
Where ABC >= Mydate.
Is there a better approach to do it ?
Thanks so much! This site is awesome with so many helpful/knowledgeable people for beginners like me! Please keep up the good work!
Solved! Go to Solution.
Hi @iRm,
What you've described is exactly how I would do it. The last step is to select the "Modify SQL Query" radio button, and then Add > Replace a Specific String...
and then replace the string "myDate" with the value from your input field "myDate"
Hope that helps!
Thank you so much!
Sorry for not being clear - it's in the lower portion of the Config Panel for the Dynamic Input.