title: Mysql CURDATE() -1
body: <p>Please, I don't understand why this command returns <em>00 April</em>.</p>
  
  <p>Today is <em>1st April 2015</em>, and executing:</p>
  
  <pre><code>mysql&gt; SELECT CURDATE() -1;
  </code></pre>
  
  <p>it returns:</p>
  
  <pre><code>| 20150400 |
  
  +--------------+
  </code></pre>
  
  <p>Why <code>CURDATE-1</code> doesn't return <em>31st March</em>?, </p>
  
  <p><em>00 April</em> is an error, please it would be great if somebody could explain it. </p>
  
  <p>Next, on <em>2nd April</em> it works well, also for the rest of the days within the month:</p>
  
  <p>mysql> </p>
  
  <pre><code>select CURDATE() -1;
  
  |     20150401 |
  </code></pre>
  
  <p>This function seems is not able to operate with <em>+x / -x</em> out of the current month scope.</p>
  
  <p>This should be highlighted in the reference guide.</p>
  
  <p>BTW, I'vereplaced it with this new function: </p>
  
  <pre><code> SELECT SUBDATE(CURDATE(),1)
  </code></pre>
  
  <p>Thanks.</p>