Get the number of days and divide by 7.
int weeks = (date1 - date2).TotalDays / 7;
You may well have a remainder of up to 6 days that will not be included in the number of weeks.
Get the number of days and divide by 7.
int weeks = (date1 - date2).TotalDays / 7;
You may well have a remainder of up to 6 days that will not be included in the number of weeks.