title: MySQL convert YYYY-MM-DD to unix timestamp
body: <p>I want to convert a YYYY-MM-DD column to unix timestamp. Similar to this question: <a href="https://stackoverflow.com/questions/3413559/mysql-convert-mm-dd-yy-to-unix-timestamp">MySQL - Convert MM/DD/YY to Unix timestamp</a></p>
  
  <p>MySQL does not seem to transform a value of '2012-05-10' to the correct unixtime. Here is the suggested function that fails:
  <code>SELECT UNIX_TIMESTAMP(CAST(dateid AS DATE)) AS unixtime</code></p>