Hi @lee_baldwin ,
I think there are a ton of ways to do this and I will show you one that is functional and easy to understand. So here I am getting the current date (run time) and then getting the "DOW" as Wednesday (example).
Next I create a handful of cases, if = Monday, get current date - 1 to get the desired previous Sunday, else in each other case, I am adding days to the current date to get the next Sunday date, adding a different number of days for each DOW.
In my example, since today is Wednesday, if gets next Sunday's date 4/28/2024. Again, functional and easy to understand recognizing there are lots of ways to achieve the same result, others may even be more efficient.
