I'm not really good when it comes to database...
I'm wondering if it is possible to get the weeks of a certain month and year..
For example: 1 (January)
= month
and 2016
= year
Desired result will be:
week 1
week 2
week 3
week 4
week 5
This is what I have tried so far...
declare @date datetime = '01/01/2016'
select datepart(day, datediff(day, 0, @date) / 7 * 7) / 7 + 1
This only returns the total of the weeks which is 5.