Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

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

Formula to Combine Weekend Dates with Monday

BrandonS4
8 - Asteroid

Is it possible to add weekend dates together with a Monday date?  I am trying to combine sales for Saturday and Sunday to sales for Monday.  For example,

 

Saturday, July 4, 2020 + Sunday, July 5, 2020 + Monday, July 6, 2020 would equal Monday, July 6, 2020.

3 REPLIES 3
JosephSerpis
17 - Castor
17 - Castor

Hi @BrandonS4 I mocked up a workflow let me know what you think. From your question I assumed the date format was "Saturday, July 4, 2020" please let me know if that is not the case?

BrandonS4
8 - Asteroid

This still works great.  However, how can I write the formula so the output is two digit month-two digit day-4 digit year??

vaishnavic
5 - Atom

If DateTimeFormat(DateTimeParse([Date],"%d-%m-%Y"),"%A") ="Sunday" then
DateTimeAdd(DateTimeParse([Date],"%d-%m-%Y"),1,"day") Elseif DateTimeFormat(DateTimeParse([Date],"%d-%m-%Y"),"%A") ="Saturday" Then DateTimeAdd(DateTimeParse([Date],"%d-%m-%Y"),2,"day") Else DateTimeParse([Date],"%d-%m-%Y") Endif

Labels
Top Solution Authors