To get the week number from the Date in C#, use following function
public static int GetWeekNumber(DateTime thisDate)
{
return CultureInfo.InvariantCulture.Calendar.GetWeekOfYear(thisDate, System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
}
This returns week number assuming first day of the week is Sunday.