title: T-SQL how to get four digit year value using two digit year part
body: <p>I have a string value 16******* that I call substring on to get the first two digits of the string literal</p>
  
  <pre><code>SUBSTRING(@CourtCaseNumber,1,2)
  </code></pre>
  
  <p>I then need  a function that will take the string argument(16) and return to me the four digit year value, 2016. Some will be of 99, therefore I'll  need a year value of 1999, 98 will need to be 1998, 15 will need to be 2015 etc.</p>
  
  <p>So it should look something like this. I can't find a function that will do this for me.</p>
  
  <pre><code>NEEDEDFUNCTION(SUBSTRING(@CourCaseNumber,1,2)  
  </code></pre>