Date
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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:
Hope this helps : )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Please see below :
1- Convert and get the first date of month
2 - Display only needed columns :
Attached the workflow,
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @atcodedog05, I believe the request was for mm/dd/yyyy, the formula should be "%m/%d/%Y"
🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for notifying @gabrielvilella updated the post.
I remember typing format %m/%d/%Y I guess I messed it somewhere 😅
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
