title: MYSQL returns full datetime string on SELECT query when column type is DATE
body: <p>I have a hard time finding answer to my question after many researches on google, but my terms do not seem accurate enough to yield the correct answers to my question.</p>
  
  <p>I have a database storing information on customers: first name, last name, birthdate etc. </p>
  
  <p>The problem is specific to my birthdate column. The type is set to DATE and for every results, everything shows up as a DATE in phpmyadmin, but when I use SELECT in my script to retrieve rows, the birthdate column is returned like if it was DATETIME type except when the value is 0000-00-00.</p>
  
  <p>I am using node-mysql to retrieve results from mysql table in my app. I built a module on top of node-mysql to shorten required code for pooling, which is where DatabasePool function comes from. Here is a sample node.js code from which the behaviour is shown:</p>
  
  <pre><code>property: {
      get: function(id, callback) {
          mysql.DatabasePool(function() {
              this.query('SELECT birthdate FROM ICM_Contact WHERE ICM_contact_id = ? LIMIT 1', [id], function(err, rows, fields) {
                  console.log(rows[0]);
                  callback(null, ICM.contact.revive(rows[0]));
              })
          });
      }
  }
  </code></pre>
  
  <p>For given date: 2015-08-11 it will return <code>{ birthdate: Tue Aug 11 2015 00:00:00 GMT-0400 (EDT) }</code>, but for date 0000-00-00 it will return <code>{ birthdate: '0000-00-00' }</code> as expected.</p>
  
  <p>I don't have any clue why phpmyadmin displays the date correctly no matter what, but when I do the query from my script, it won't return the date correctly.</p>
  
  <p>I have tried the following: <a href="https://stackoverflow.com/questions/9032047/datetime-mysql-select-only-date">datetime mySQL SELECT only date</a></p>
  
  <pre><code>property: {
      get: function(id, callback) {
          mysql.DatabasePool(function() {
              this.query('SELECT date(birthdate) FROM ICM_Contact WHERE ICM_contact_id = ? LIMIT 1', [id], function(err, rows, fields) {
                  console.log(rows[0]);
                  callback(null, ICM.contact.revive(rows[0]));
              })
          });
      }
  }
  </code></pre>
  
  <p>But still the date is returned as datetime.</p>