title: extract the month and the year in this format: "mm-yyyy" along with all columns
body: <p>I have a field start in my databse from the type date. I want to extract the month and the year in this format: mm-yyyy, I also need all other columns.  </p>
  
  <p>I tried this:</p>
  
  <pre><code>$query='SELECT *, DATEADD(MONTH, DATEDIFF(MONTH, 0, start), 0) AS [start] FROM ...
  </code></pre>
  
  <p>according to 
  <a href="https://stackoverflow.com/questions/1781946/getting-only-month-and-year-from-sql-date">Getting only Month and Year from SQL DATE</a></p>
  
  <p>but it doesn't work. Error:</p>
  
  <pre><code>Incorrect parameter count in the call to native function 'DATEDIFF'"
  </code></pre>
  
  <p>Also I'm not sure how to continue afterwards.  found this:
  <a href="https://stackoverflow.com/questions/17565980/sql-query-change-date-format-in-query-to-dd-mm-yyyy">SQL Query - Change date format in query to DD/MM/YYYY</a></p>
  
  <p>So my guess would be:</p>
  
  <pre><code>Convert(varchar(10),CONVERT(date,DATEADD(MONTH, (DATEDIFF(MONTH, 0, start), 0) AS [start]),106),103)
  </code></pre>
  
  <p>but then I still have the days.</p>