Detecting Weekend dates between two given dates
-
I want to write code to determine the number of weekend days (i.e. Saturday and Sunday) in between two given dates. For example locate saturday and sunday between [05/21/2009 and 07/06/2009]. Any help will be appreciated.
Banjo Ayorinde
-
I want to write code to determine the number of weekend days (i.e. Saturday and Sunday) in between two given dates. For example locate saturday and sunday between [05/21/2009 and 07/06/2009]. Any help will be appreciated.
Banjo Ayorinde
try using AddDay function of data object. First loop from start date to end date. For each iteration call add day with value 1 and then check returned date if its week end then increment your counter variable.
Share your experience with others Check my Blog...
-
try using AddDay function of data object. First loop from start date to end date. For each iteration call add day with value 1 and then check returned date if its week end then increment your counter variable.
Share your experience with others Check my Blog...
Thanks for your response. Please am a newbie in c# asp.net Can you please help me with sample code on how to iterate through two dates (e.g. 04/25/2008 to 05/21/2008) Thank you in anticipation
Banjo Ayorinde
-
Thanks for your response. Please am a newbie in c# asp.net Can you please help me with sample code on how to iterate through two dates (e.g. 04/25/2008 to 05/21/2008) Thank you in anticipation
Banjo Ayorinde
Code sample is not possiable because right now I am away from my desktop, here is a PHP example link. It will give you enough idea about solution http://bytes.com/topic/php/answers/447768-how-do-you-get-list-all-dates-between-two-dates-more-than-day-apart[^]
Share your experience with others Check my Blog...