Date range constraints

What is the best way to constraint this Rg to show these dates from this dropdown

1 Like

Obviously, it depends a bit on what kind of dates you’re searching for - i.e. dates which can’t possibly be in the future (such as ‘Created dates’ or dates of things which have happened), or dates of things which can occur in the future (like due dates or birthdays etc.), and also how you want to define things like ‘Last 7 days’ (i.e. does that mean 7 days prior to the current date/time, or 7 days prior to the current Day etc.)…

But here are the general principles…

Today:

Date ≥ Current date/time: rounded down to Day
Date < Current date/time: rounded down to Day: + (Days) 1

Yesterday

Date ≥ Current date/time: rounded down to Day: + (Days) -1
Date < Current date/time: rounded down to Day

Last 7 Days

Date ≥ Current date/time: + (Days) -7
Date < Current date/time

Last 30 Days

Date ≥ Current date/time: + (Days) -30
Date < Current date/time

This Month

Date ≥ Current date/time: Rounded down to Month
Date < Current date/time: Rounded down to Month: + (Months) 1

Previous Month

Date ≥ Current date/time: Rounded down to Month: + (Months) -1
Date < Current date/time: Rounded down to Month

3 Likes

Thanks for the quick response - I’m trying to implement it now .

Thanks for your help. I don’t know if it’s the most efficient way of doing it but it works

This topic was automatically closed after 70 days. New replies are no longer allowed.