Alteryx Designer Desktop Discussions

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

Formula for Previous Friday Date

KamenRider
11 - Bolide

Hi Guys,

 

Can you please help me to find for the formula in giving me the previous Friday. Even today is Sat which is 8/12/2023, it will still give me 8/4/2023 since it is its previous Friday. And Even if I run it 8/9/2023, it will still give me the previous Friday date which is 8/4/2023.

 

Thanks and looking forward for any of your thoughts.

 

Kamen

6 REPLIES 6
rzdodson
12 - Quasar

@KamenRider this might be able to help you out. In the second formula, you'll need both components for the formula to work. Included my notes in the formula so you can see the why behind the formula structure.

 

Testing Friday.png

KamenRider
11 - Bolide

Hi @rzdodson 

 

Can you help apply your formula since I am getting a null value. I am using a date tool and I can't figure out how to make the data type for Date as Date. The format of the date should be mm/dd/yyyy (example - 08/12/2023). Please see screenshot below.

 

DDate2.PNG

Looking forward for your response.

 

Thanks,

Kamen

rzdodson
12 - Quasar

@KamenRider this should be the solution you are looking for. If it works, please mark it as a solution to help out those looking for a similar response. :)

 

Change the second formula to a string field (V_WString). The "Test2" formula I created should be the working solution.Testing Friday.png

 

 

KamenRider
11 - Bolide

Hi @rzdodson 

 

Why is it when I run your workflow, it still give me a null values. see screenshot below?

 

xxCapture.PNG

 

Please advised

Kamen

rzdodson
12 - Quasar

@KamenRider I updated the workflow above. Changed the above workflow to concatenate substrings to build out the date format you are looking for.

KamenRider
11 - Bolide

Hi @rzdodson 

 

I think I was able to solve the error. Made some changes since your formula is missing Saturday.

 

ANSER.PNG

Thank your for your assistance in solving this problem. While this is still under my observation, I will select this as the final solution. Once again thanks. Looking forward for your help on my next workflow.

 

Kamen

Labels