Display next closest Mon - Sunday period's due items

I’m trying to show items that are due next week, where next week is the next closest Monday - Sun period.

I’ve tried a couple expressions but no luck and I can’t figure out how to configure the Mon - Sun period within the expression…
What expression should I be using?

Hi there, @brendan.a.ford… give these constraints a go… I think they should do the trick.

Hope this helps.

Best…
Mike

Fantastic - it worked perfectly. Do you mind just breaking down and explaining the “:rounded down to week +(days): N” expression for me so I can understand it better?

Thanks @mikeloc!

1 Like

Rounding the current date/time down to week gives you the very start of the current week (i.e., 12:00am on the Sunday that starts the week). Add 8 days to the current date/time rounded down to week and you get the Monday of the following week. Add 14 days to it and you get the Sunday that follows the Monday you just got.

1 Like

Awesome explanation, makes perfect sense. Thanks again!

1 Like

Actually, now that I look at it again, you should add 15 days to the second constraint so that the Sunday is included (the way it is now, it would cut off at 12:00am on the Sunday).

Good catch! Updated.

Thanks

1 Like

@mikeloc when I try to apply this logic to another time period (ie: Tomorrow) there seems to be an issue as nothing appears in the RG for Tomorrow, even though I’m filtering correctly (I believe).

There wouldn’t be a discrepancy between the date/time picker plugin I’m using for the ‘duedate’ field and my actual browser date/time would there?

The current date/time plus 1 day is an exact moment tomorrow, and it is very unlikely that a task is due at that exact moment (which is why nothing is appearing in the repeating group). You need to use two constraints like I showed you, and round down to date instead of week.

1 Like

:bulb:

I see - so “rounded down to X” essentially starts the logic from X, rather from ‘this point in time’?

Appears to have worked perfectly! It’s apparent to me now that an ‘end constraint’ must also be applied in order to capture data within a date range - obviously.

Thanks @mikeloc - super helpful!

1 Like

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