Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Workday or which day (MON, TUE, WED...) is it certain date?

Joost_Bakker
5 - Atom

Hi, I have not found a way to get the previous workday from Alteryx. Am I overlooking something? Is there a way how to calculate this?

6 REPLIES 6
PhilipMannering
16 - Nebula
16 - Nebula

How does your data come in? Is it a date format (e.g. 2021-01-01) or just the day name (e.g. Tuesday)?

Christina_H
14 - Magnetar

I've used this to get the date of the next Monday from when the workflow runs:
ToDate(datetimeadd(datetimetoday(),8-tonumber(DateTimeFormat(datetimetoday(),"%w")),"days"))

 

You should be able to adapt this to get the result you want.

Joost_Bakker
5 - Atom

It comes from the Date Time Now tool. I want to calculate what the previous business day was and the business day before that.

Christina_H
14 - Magnetar

Assuming your working days are Mon-Fri, this finds the previous working day based on the date entered (returns current date for a working day)

Christina_Hurrell_0-1633354967051.pngChristina_Hurrell_1-1633354992385.png

 

Joost_Bakker
5 - Atom

Thanks! A bit busy today, will try to include it in my workflow tomorrow

Joost_Bakker
5 - Atom

I went for an easy solution: In Excel a static data file that includes the previous business day taking into account the Target holiday calendar.

Needed some static data anyway, so no extra file needed.

 

Thanks for your help in understanding the Alteryx capabilities better.

Labels