Hi all, I have an excel file I am trying to filter the data to show only the rows that have a start date from 10 days back through today. Currently this is my formula:
[Start Date] >= ToDate(DateTimeAdd(DateTimeToday(), -1 * 10, "days")
The issue I am seeing is that its not actually showing today's date. Can anyone help me to understand what I did wrong and how I can fix it going forward?
I am pretty inexperienced in Alteryx, and learning as I go - so all the help I can get is appreciated!
@svargas01 try this expression
[Start Date] >= DateTimeAdd(DateTimeFormat(DateTimeNow(),"%Y-%m-%d"),-10,"days")
also attached a workflow for refence. Let me know if it helps
Okay - so I have some follow up questions.
My current workflow sets the date time differently. I have it output from the DateTime as:
2000-01-02 03:04:05
- Does this format matter for your formula?
In my Start Date filter I originally had 2 formulas, the date one I mentioned (date >= 10 days back) as well as one to filter on a second column to show only rows where that column has 9 digits. Here is the full original formula:
[Start Date] >= ToDate(DateTimeAdd(DateTimeToday(), -1 * 10, "days"))
AND
[Start Date] <= DateTimeToday() and length(tostring([BANK_ACCOUNT_NUM]))==9
When I replace the first part with your formula, I get a parse error - do I need to change the second portion of my formula as well? or is it related to the the output format I have in the DateTime tool?
Unfortunately I am not able to share my data, but I could provide screenshots of my workflow if that would help.
Thanks for your time and help!
@svargas01 what is the data type of start date? Yes provide a screenshot of formula tool
User | Count |
---|---|
107 | |
82 | |
70 | |
54 | |
40 |