I am looking for a way to find the number of weekdays between the first day of the month and a given date.
I've calculated the number of days like in the screenshot, but I can't find a way to take only weekdays into account.
I know I can find the day of the week via the DayOfWeek function, but couldn't find a way to incorporate this in the formula above.
Basically I need to see the number of weekdays elapsed on a given date compared to the start of that month.
I'd appreciate it if anyone could help me with this.
Thanks in advance,
Thank you all for your replies. I think the suggestion given by SASKiwi should be the easiest way for us.
We'll add the extra column to the data, so we can use it for our calculations instead of trying to build it all in the VA interface.
I'm glad you found some useful info! If @SASKiwi's reply was the exact solution to your problem, can you "Accept it as a solution"? Or if it was particularly helpful, feel free to "Like" it. This will help other community members who may run into the same issue know what worked.
Join us for SAS Community Trivia
SAS Bowl XXIX, The SAS Hackathon
Wednesday, March 8, 2023, at 10 AM ET | #SASBowl
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.