I'm new to Alteryx, hopefully this is an easy question... I'm trying to identify the week ending date based on a date that I have. For example, today's date 07/09/2019 would be the Friday week ended 07/12/2019. Thanks!!
Solved! Go to Solution.
A pretty brute force method would be to figure out the day of the week (Monday = 2, for example) and then calculate the difference between the given date and Friday (4 days, using our example). Then add that number of days to the original date using a datetimeadd formula.
This would need to adjust for Saturdays however, as I'm guessing you'd want the following week, not the previous day.
Hey @CPAul
I went for an approach that adds 7 days onto your date and then filters for the fridays...
Clever! thank you!
Paul
one very minor correction to the solution, the "Condition Expression" in the Generate Rows tool should be:
DateAdd <= DateTimeAdd(Date, 6, "Days")
instead of:
DateAdd <= DateTimeAdd(Date, 7, "Days")
The original way double counted days that were already a Friday.
Thanks again,
Paul