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.
解決済み

Change the date of Specific Days

masfouaa
メテオロイド

Hello everybody 

 

I need a formula or tool can select specific day to change them like below  statements: 

 

  • "if the day is Friday then the date will decrease by 1 day" 
  • "if the day is Saturday then the date will decrease by 2 days"

 

 

2件の返信2
binuacs
ポラリス

Switch(DateTimeFormat([Due Date],"%A"),[Due Date],"Friday",DateTimeAdd([Due Date],-1,"days"),"Saturday",DateTimeAdd([Due Date],-2,"days"))

 

 

スポイラ
binuacs_0-1639032659923.png

 

masfouaa
メテオロイド

Incredible!

 

thanks a lot.. ^^

ラベル
トップのソリューション投稿者