How to calculate the no : of working days in a month?
if i work 21 days per month means
how i calculate the no:of working days in a month except (Holiday) sunday?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jun 16, 2012, 6:21 AM
label1.Text = workingDays.ToString(); // 21
If you want to regard Saturday as a working day, then just change this line:
if(dt.DayOfWeek != DayOfWeek.Sunday && dt.DayOfWeek != DayOfWeek.Saturday) workingDays++;
to this:
if(dt.DayOfWeek != DayOfWeek.Sunday) workingDays++;