Hello,
I have a dataset with some date columns.
I have to filter out rows for which that date is within last 6 months.
I am using formula DateTimeDiff(DateTimeNow(),[X],'months') > 6
But it is filtering out dates but it's not working quite fine. Showing dates which are in future as well with any difference of months.
Would be good if anyone can provide better formula.
The date type is yyyy-mm-dd.
Solved! Go to Solution.
@ShantanuDagar
Okay, just to disect the problem:
This is how your formula is behaving.
In order to only find things within the last 6 months
I'd just add the AND clause to your filter:
Remember, if you want to access the "inclusion", just check your other output anchor in the Filter Tool:
Hi @ShantanuDagar ,
If I understand your ask correctly, you want to filter the data from last 6 month i.. from 26th Oct 2022 to 26th April 2023 (Today's date).
I have attached my solution. First, I have calculated date 6 month prior today and then used filter. I have attached my solution.
Let me know if I can assist you further.
Thanks
You can use below formula :
[Today's Date] >= DateTimeAdd(DateTimeToday(), -6, "months")
@ShantanuDagar your formula using the greater (>), which will always give you future date, I think you should use <=
DateTimeDiff(DateTimeNow(),[X],'months') <= 6
User | Count |
---|---|
106 | |
85 | |
76 | |
54 | |
40 |