How to get week from specified date range

@Mathkar_kunal,

May be try this approach.

Get week number for start and end date individual and then check if it’s the same or not. If same take that as week number else that would be going to be exception may be.

weekNumber = DatePart(DateInterval.WeekOfYear, DateTime.ParseExact("2025-01-26", "yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture), FirstDayOfWeek.Monday, FirstWeekOfYear.System)