Using the DateTimeDiff function but exclude weekends
- 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
I am trying to count the numbers of days between two dates but want to exclude the weekend days from the count. For example from 7/30/21 to 8/5/21, I only want to have a value of 5 returned not 7.
Solved! Go to Solution.
- Labels:
- Date Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @jbooker1 I mocked up and approach on one way to tackle this. Essentially the approach generates all the days from the start and end days and then filters out Saturday and Sunday. I used some of the date time functions and specifiers from Alteryx which can be found here. One of the benefits of an approach like this is you can follow the entire process in a number of steps and should be able to easily troubleshoot any issues that might appear.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That did work, thank you for the insight. The one modification I did was I used the DateTime tool to convert the Date/Time fields to string on the source data at the beginning of the workflow that way I could select the new formatted columns as I built the rest of the work flow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@jbooker1without having looked at @JosephSerpis - check out how he uses the multi-field tool. That does the conversion and keeps the original file name but changes it to a date.
