title: MySQL SELECT Query: Add 28 days to the last date of a financial quarter
body: <p>I am wanting to add 28 days to the last day of a quarter.</p>
  
  <p>I currently have the following to determine the Quarter period, how can I then add 28 days to the last date of the last month in the quarter.</p>
  
  <pre><code>CASE    -- Results:  2011-Q4 (Financial Year-Qtr)
      WHEN MONTH(T5.date_purchased) BETWEEN 1  AND 3  THEN concat((YEAR(T5.date_purchased) - 1), '-', 'Q3')
      WHEN MONTH(T5.date_purchased) BETWEEN 4  AND 6  THEN concat((YEAR(T5.date_purchased) - 1), '-', 'Q4')
      WHEN MONTH(T5.date_purchased) BETWEEN 7  AND 9  THEN concat((YEAR(T5.date_purchased) - 0), '-', 'Q1')
      WHEN MONTH(T5.date_purchased) BETWEEN 10 AND 12 THEN concat((YEAR(T5.date_purchased) - 0), '-', 'Q2')
  END AS FYrQtr,
  </code></pre>
  
  <p>I do not need to account for anything unusual, simply the 28th of the next month in the next quarter.</p>
  
  <p>I have tried the following, but of course that adds 28 days to the order date, not the financial qtr.  (I do not need the time)</p>
  
  <pre><code>CASE    --  Results:  2012-06-20 07:20:07  not  2012-07-28
      WHEN MONTH(T5.date_purchased) BETWEEN 1  AND 3  THEN date_add(T5.date_purchased, Interval 28 day) 
      WHEN MONTH(T5.date_purchased) BETWEEN 4  AND 6  THEN date_add(T5.date_purchased, Interval 28 day)
      WHEN MONTH(T5.date_purchased) BETWEEN 7  AND 9  THEN date_add(T5.date_purchased, Interval 28 day)
      WHEN MONTH(T5.date_purchased) BETWEEN 10  AND 12  THEN date_add(T5.date_purchased, Interval 28 day)
      END AS FRangeQtrBAS,
  </code></pre>
  
  <p>Many thanks in advance.</p>