[DateColumn2] = DateTimeAdd("2021-01-30", 10, "days") will return data from 10 days after 30th of January which is 9th February. How do I get data from the first 10 days after "2021-01-30" instead? i.e. every single day from 31st January till 9th February.
Solved! Go to Solution.
Here is my take on it. If you are getting value from another column.
Workflow:
Hope this helps : )
Hi @timioluwatimi,
If I'm understanding your question correctly, you are looking to just filter your data between a set of dates. If this is correct, you can write the formula into your Filter tool as follows:
[DateColumn2] > "2021-01-30" AND [DateColumn2] <= DateTimeAdd("2021-01-30", 10, "days")
This will now filter to all dates from 2021-01-31 to 2021-02-09. There are ways to make this more dynamic instead of hardcoding it into the formula, but this should get you started.
Cheers!
Phil
Filter your data accordingly with the following expression:
[Date] >= [Date] AND [Date] <= DateTimeAdd("2021-01-30", 10, "days")
@HomesickSurfer - Tried your solution, not working as expected. [Date] >= [Date] is referencing itself, so will always be true. Your formula essentially boils down to [Date]<= "2021-02-09". So basically all dates before Feb 09 will be included.
Should clarify there are two different date columns so what worked was: [Date2] >= [Date] AND [Date2] <= DateTimeAdd([Date], 10, "days")
My formula references a range. It works, assuming that the data has 1 date field to analyze.
Interesting scenario on how usecase can be misinterpreted in different ways 😅
Kudos to you @Maskell_Rascal and @HomesickSurfer for interpreting it correctly 🙂👍
Hi All, I want to replace '30' in below function with column reference. I need 2nd argument in datetimeadd to be dynamic for which the number of days feed comes from another column (in my case another column is 'No. of Days'). please suggest how is it possible?
datetimeadd([Date],30,'days')