montypython1
Technical User
Greetings,
What is the best way to calculate the # of workdays in a given month and the # of workdays SO FAR in that month?
I can calculate the first day of the month, the current day of the month, and the last day of the month as follows:
- lddatefirstday = DATE() - DAY(DATE())+1
- lddatecurrday = DATE()
- lddatelastday = GOMONTH(DATE() - DAY(DATE()) - 0, 1)
I know the solution is to somehow use the function DOW(), but I can't figure out how to structure the procedure. I simply want to count how many workdays there are within that range of dates. Then I want to calculate how many workdays have passed. This will enable me to accurately calculate a forecast for the month, exclusive of weekends.
Any suggestions?
Thanks,
Dave
What is the best way to calculate the # of workdays in a given month and the # of workdays SO FAR in that month?
I can calculate the first day of the month, the current day of the month, and the last day of the month as follows:
- lddatefirstday = DATE() - DAY(DATE())+1
- lddatecurrday = DATE()
- lddatelastday = GOMONTH(DATE() - DAY(DATE()) - 0, 1)
I know the solution is to somehow use the function DOW(), but I can't figure out how to structure the procedure. I simply want to count how many workdays there are within that range of dates. Then I want to calculate how many workdays have passed. This will enable me to accurately calculate a forecast for the month, exclusive of weekends.
Any suggestions?
Thanks,
Dave