I am trying to find the week number of a particular month given a date, so I want to know which week is that for given month
Example if I enter
- 2016 Feb 2 ---> Week 1
- 2016 Feb 9 ---> Week 2
- 2016 June 2 ---> week 1
- 2016 Jan 25 ---> week 5
Can I achieve this in a T-SQL query?
I have seen the following option
DATEPART(wk, BookingTimeStamp)
But that gives the week number of the year, not the month
The idea is to build result per week for a given month