title: How can I combine fixed month and day with sql year function?
body: <p>I want to compose a date in <code>T-SQL</code> with a fixed day and month (always the last day and month of the year), the year must be variable. </p>
  
  <ul>
  <li>the day is always: <code>31</code> </li>
  <li>the month is always: <code>12</code></li>
  <li>the year is variable, let's say <code>2014</code></li>
  </ul>
  
  <p>The format would be like <code>12-31-2014</code> or <code>12-31-2015</code>.</p>
  
  <p>I have the <code>YEAR</code> function in mind:</p>
  
  <pre><code>select '12'+YEAR(getdate())-1
  </code></pre>
  
  <p>but this results in <code>2014+12=2026</code>.</p>
  
  <p>How can I achieve this with T-SQL?</p>