Answers for "count no of sundays between two days"

0

count no of sundays between two days

DateTime fdate = yourFinishDate;
DateTime sdate = yourStartDate;

int CountSundays = (1 + fdate.Subtract(sdate).Days + (6 + (int)sdate.DayOfWeek) % 7) / 7;
Posted by: Guest on September-12-2021

Code answers related to "count no of sundays between two days"

Browse Popular Code Answers by Language