Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Date

nkr306_nkrs
7 - Meteor

Hi Friends

 

I am running alteryx workflows based on the dates. I have a scenario, where I want 1st working day of next month. For example, if the current date is 01/04/2022 then I need 1st working day of next month as 02/01/2022. Date format is mm/dd/yyyy. Please help me to solve this issue.

13 REPLIES 13
atcodedog05
22 - Nova
22 - Nova

Hi @nkr306_nkrs 

 

Here is how you can do it. Doesn't account holidays only weekends

 

 

 

 

IF DateTimeFormat(DateTimeAdd(DateTimeFirstOfMonth(),1,"month"),"%a")="Sun" 
THEN 
DateTimeAdd(DateTimeAdd(DateTimeFirstOfMonth(),1,"month"),1,"day")
ELSEIF DateTimeFormat(DateTimeAdd(DateTimeFirstOfMonth(),1,"month"),"%a")="Sat" 
THEN 
DateTimeAdd(DateTimeAdd(DateTimeFirstOfMonth(),1,"month"),2,"day") 
ELSE DateTimeAdd(DateTimeFirstOfMonth(),1,"month") ENDIF

 

 

 

 

Workflow:

atcodedog05_0-1642440422331.png

 

 

Hope this helps : )

bensilv
Alteryx
Alteryx

Hi @nkr306_nkrs,

 

Depending on whether you want to take holidays in to account, you should find your solution in one of these two posts:

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Count-working-days/td-p/672159
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Business-Day-formula/td-p/484513

Essentially you will want to utilise the DateTime Functions (https://help.alteryx.com/20213/designer/datetime-functions) and add a lookup table in to the mix to account for holidays!

 

Ben

PhilipMannering
16 - Nebula
16 - Nebula

Does this do what you need? Doesn't take into account holidays.

PhilipMannering_0-1642440866299.png

 

messi007
15 - Aurora
15 - Aurora

@nkr306_nkrs,

 

Please see below :

 

1- Convert and get the first date of month

 

messi007_0-1642441043083.png

2 - Display only needed columns :

 

messi007_0-1642440854228.png

 

Attached the workflow,

Regards,

nkr306_nkrs
7 - Meteor

I am getting the result but in "2022-02-01 00:00:00 " format. Can you help me with the solution which give me mm/dd/yyyy (in this case 02/01/2022) format with out the time. Thanks in advance

atcodedog05
22 - Nova
22 - Nova

Hi @nkr306_nkrs 

 

Here is the updated workflow.

atcodedog05_0-1642517346490.png

 

Hope this helps : )

gabrielvilella
14 - Magnetar

Hey @atcodedog05, I believe the request was for mm/dd/yyyy, the formula should be "%m/%d/%Y"

🙂

atcodedog05
22 - Nova
22 - Nova

Thanks for notifying @gabrielvilella updated the post.

 

I remember typing format %m/%d/%Y I guess I messed it somewhere 😅

nkr306_nkrs
7 - Meteor

Thanks for response. I tried the same with a different same as 12/29/2021 but the result is still coming up as 02/01/2022 instead of 01/03/2022. Can you please help

Labels