I need to create a way to quickly filter dates 1 year before now, 6 months before now, 1 month before now, 1 week before now, etc. Buttons looks to be the best option. Looked into Date Picker, but to select the range manually takes too long and had some other issues. I created a button and tested it with "Select values matching search criteria" and "Select values in a field" actions. It worked with both actions when value was "='2024-09-23 00:00:00.000000'", worked with "Select value in a field" when value was "='2024-09-23'". Then tried a value suggested by chatGPT "='>=' & Date(AddMonths(Today(), -6))". None of the actions worked. Tried similar things like "='>=2024-01-01'", "='>2024-01-01'", etc, but nothing worked. For me it looks that value field has to have all the values I want to select, but I could not find a way to create a list of dates for the past 6 months dinamically. I was thinking about setting variables as well. What could I do in this situation?
I think you need to give the format of the date as well. In my case the date field is in format YYYY-MM-DD
so my button expression is:
='<=' & Date(AddMonths(Today(),-6) ,'YYYY-MM-DD')
And this works ok with Select values matching search criteria
action.