title: Converting datetime to month-year only - T-SQL
body: <p>I want to convert a dateTime value to Month-Year (note the <strong>(-)</strong> between them).</p>
  
  <p>i want them like Jan-2014, Feb-2014, Mar-2014, Apr-2014. </p>
  
  <p>i have tried </p>
  
  <pre><code>SELECT convert(varchar(7), getdate(), 126) 
  SELECT right(convert(varchar, getdate(), 106), 8) 
  </code></pre>
  
  <p>But the first line gives me 2014-05 (i need it like May-2014) while the second line gives May 2014 (its missing the -, as in May-2014)</p>