This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hello,
I'm trying to filter for everything within the next 2 months but all I'm getting is data for December.
Can anyone see what I'm doing wrong?
DateTimeAdd(DateTimeFirstOfMonth(),+2,"months")= DateTimeTrim([DateTime_Out],"months")
Thanks,
Phill
Solved! Go to Solution.
Hi @Phill
Intresting scenario but not completely clear. If you provide a sample data and your workflow we can troubleshoot it for you.
You want to actually use the DateTimeAdd() to do something like this: DateTimeAdd(DateTimeNow(),2,"month
Hi @Phill ,
what about this condition:
DateTimeTrim([DateTime_Out],"months") <= DateTimeAdd(DateTimeFirstOfMonth(), 2, "months")
AND
DateTimeTrim([DateTime_Out],"months") > DateTimeFirstOfMonth()
It should select all records within the next two months, excluding current month!
Let me know if it works for you.
Best,
Roland
Hi @Phill ,
Here is a workflow for the task. It filters date within 2 months from this months first day both forward and backward.
Workflow :
Keep only [Gap]<=2 for only forward months.
Hope this helps 🙂
If this post helps you please mark it as solution. And give a like if you dont mind 😀👍
Hi @Phill
Change your condition into since you are looking for upcoming two months.
DateTimeAdd(DateTimeFirstOfMonth(),+2,"months") >= DateTimeTrim([DateTime_Out],"months")'
Your current :
DateTimeAdd(DateTimeFirstOfMonth(),+2,"months") = DateTimeTrim([DateTime_Out],"months")'
2 months from now is December.
Hope this helps 🙂
If this post helps you please mark it as solution. And give a like if you dont mind 😀👍
Thanks @atcodedog05 @RolandSchubert @joshuaburkhow
I tried those suggestions but it still seems to be throwing out some odd dates. I'd have to make a separate data sample to share it so I'm not sure how useful that would be.
Basically the date data came in including a time so I ran it through a DateTime to convert it to YYYY-MM-DD.
Then what I'm trying to do is add a filter so that whenever the workflow is run it takes all data that has a date within the next months of the date the workflow is running. So that's everything from 0/10/2020 to 05/12/2020.
Hey @atcodedog05
No errors its just not giving me within the next 2 months. I tried DateTimeAdd(DateTimeFirstOfMonth(),+2,"months") >= DateTimeTrim([DateTime_Out],"months") but that included all kinds of dates.
Hi @Phill
Try this
Edited:
(DateTimeAdd(DateTimeFirstOfMonth(),+2,"months") >= DateTimeTrim([DateTime_Out],"months"))
and (DateTimeTrim([DateTime_Out],"months")>=DateTimeFirstOfMonth())