Hi Joroen,
Firstly I want to say thanks for your quick response. But your suggestion still need to input the date (@curr_date_time) to calculate start and end date of a week. In my example, I have already had week number from given dates, and then in the WHILE scope you can see the @min_week is increased after each loop. So I need to determine the start and end date of next week basing on the week number
WHILE @min_week <= @curr_week
BEGIN
@start_date_of_week = ???
@end_date_of_week = ???
/*Do Some Logic*/
SELECT @min_week = @min_week + 1
END
For example: Assuming that I get the week number of current date (March 30, 2016), and the result should be 14. And then I increase the week number up to 15, how can I determine the start and end date of week for week number 15 ?
Thanks
Khoa Tran