Possible Duplicate:
Calculate the number of weekdays between two dates in C#
Is there a method to know how much saturdays and sundays there are between two dates? for example: 13/01/2011 to 28/02/2011 result will be: 3 saturdays and 3 sundays
can someone help please? thank you in advance
You could traverse through days between the two dates and for each day check it against saturday and sunday. Datetime
conains DayOfWeek
.
精彩评论