Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Finding Specific Date for Specific Weekday

Nsantana
7 - Meteor

How can I find the date for a previous day of the week based on a date in the following week?

 

Example:

I need the previous Thursday

8/18/21 would bring in 8/12/21

8/17/21 would bring in 8/12/21

8/20/21 would bring in 8/12/21

I would like to pull in the previous Thursday, despite what day of the week the date for lands on.

 

This makes it so that the counting days formula doesn't work in this scenario. 

2 REPLIES 2
dataguyW
11 - Bolide

Many ways to get there.  Here is one.  DateTimeAdd(DateTimeTrim([INPUT_DATE],'day'),-1* (ToNumber(DateTimeFormat([INPUT_DATE],"%w"))+3),'days')

Nsantana
7 - Meteor

Thank you

Labels
Top Solution Authors