title: Concatenating date functions mysql
body: <p>A mysql query is returning unexpected. I'm trying to concatenate a few strings containing date queries like so:</p>
  
  <pre><code>mysql&gt; select month(timestamp) +'-'+ day(timestamp) + '-' + 
         year(timestamp) as date FROM table ORDER BY timestamp DESC LIMIT 1;
  </code></pre>
  
  <p>and I'm getting a 4 digit result, which I assume is the sum of the expected result:</p>
  
  <pre><code>+------+
  | date |
  +------+
  | 2035 |
  +------+
  </code></pre>
  
  <p>I've also tried casting each one as <code>CHAR</code> which didn't work:</p>
  
  <pre><code>mysql&gt; select CAST(month(timestamp) as CHAR) +'-'+ CAST(day(timestamp) as CHAR) + '-' + 
  CAST(year(timestamp) as CHAR) as date FROM table ORDER BY timestamp DESC LIMIT 1;
  </code></pre>
  
  <p>Could someone let me know what I'm doing wrong? ... and I guess how to fix it would be nice too :)</p>