Counting Days excluding the weekends

Hi,

I am trying to count the weekdays from the start of the month till today. I need the number to further calculate the average calls per workday by an agent. This is why I need to exclude the weekends.

Would be super thankful for help.

Best regards

Hi there, @chiara1… this post is probably the best way to go, but you can hack something together if you don’t want to use a plugin. I did something quite a while ago where I got the week number of the second date in the range and subtracted the week number of the first date in the range, multiplied the result by 2, and subtracted that number from the number of days in the range. See, hacky, but it did the trick for my use case.

Hope this helps.

Best…
Mike

1 Like

You can create a list of days, starting in “Current Date/time:rounded down to month” until “Current Date/time” filtered by dates where the day is not 0 (Sunday) or 6 (Saturday). Use :count to know the number of the days in this list.

This should work :+1:

1 Like

I went down that path ages ago, @rpetribu, but as plenty of threads in the forum point out, creating a list of dates in a date range without using a plugin is damn near (if not) impossible. So, at that point, you might as well use the plugin in the post in my initial reply. I didn’t want to use a plugin, and because I couldn’t create the list of dates I needed, I came up with the hack I described.

I’ve used this plug-in a few times and it works great…

It’s dead simple to use, and you can include a list of public holidays to exclude as well… so might be worth a look.

1 Like

Yes yes… I used a plugin to generate the list. But I can’t remember the name :sweat_smile:…

This topic was automatically closed after 70 days. New replies are no longer allowed.