title: Date calculation using Getdate() and patindex
body: <p>Hopefully this is a simple one </p>
  
  <ol>
  <li>I want to use getdate() to tell me todays date (Done) , </li>
  <li>then i want to take the numbers portion from a column (Don)</li>
  <li>Then I want to add 1 and 2 and generate a column damed "Date Expires" . for example if the aplhanumeric column is called CalendarHeaders.Description i will use Patindex to get the number portion , but my question is how do i add the patindex result to getdate() so that i can get the actuall expirations date?</li>
  </ol>
  
  <p><strong>Sample Data</strong></p>
  
  <pre><code>CalendarHeaders.Description 
  2 Days from today
  5 Days from today
  10 Days from today
  </code></pre>
  
  <p><strong>Sample Query so far</strong></p>
  
  <pre><code>SELECT      
    left(CalendarHeaders.Description, patindex('%[^0-9]%',  CalendarHeaders.Description+'.') - 1) as Expiration, 
    GETDATE()as DateSold 
  </code></pre>
  
  <p><strong>Sample Results  (Missing DateExpires)</strong> </p>
  
  <pre><code>Expiration          Datesold                    DateExpires
  2                   2012-07-17 04:26:10.283      2012-07-19 04:26:10.283
  5                   2012-07-17 04:26:10.283      2012-07-22 04:26:10.283
  10                  2012-07-17 04:26:10.283      2012-07-27 04:26:10.283
  </code></pre>