I want to find out a week number in a month in a query. for example this gives me the week number in a year
datepart(wk,p1labdate) as week, but i would want to know somethign similar for a month for example for may 2011 and june 11.
5/1/11 would be week 1
5/8/11 would be week 2
5/15/11 would be week 3
5/22/11 would be week 4
5/29/11 would be week 5
6/5/11 would be week 1
6/12/11 would be week 2
6/19/11 would be week 3
6/26/11 would be week 4
datepart(wk,p1labdate) as week, but i would want to know somethign similar for a month for example for may 2011 and june 11.
5/1/11 would be week 1
5/8/11 would be week 2
5/15/11 would be week 3
5/22/11 would be week 4
5/29/11 would be week 5
6/5/11 would be week 1
6/12/11 would be week 2
6/19/11 would be week 3
6/26/11 would be week 4