title: How to get week number of the month from the date in sql server 2008
body: <p>In SQL Statement in microsoft sql server, there is a built-in function to get week number but it is the week of the year.</p>
  
  <pre><code>Select DatePart(week, '2012/11/30') // **returns 48**
  </code></pre>
  
  <p>The returned value <strong>48</strong> is the week number of the year. </p>
  
  <p>Instead of <strong>48</strong>, I want to get <strong>1, 2, 3 or 4</strong> (week number of the month). I think the week number of the month can be achieved by modules with Month Number of this week. For e.g.</p>
  
  <pre><code>Select DATEPART(week, '2012/11/30')%MONTH('2012/11/30')
  </code></pre>
  
  <p>But I want to know is there other built-in functions to get WeekNumber of the month in MS SQL SERVER.</p>