title: last friday of a given month in sql server
body: <p>How do i get the date for last friday of the month in T-SQL?</p>
  
  <p>I will be passing the year and month as parameter,e.g, 201211.
  If I pass '201211' as parameter it should return me '20121130' as answer as it's the date of last friday of month of november'12.</p>