title: PHP MYSQL -> Display dates saved as 'date' type from MYSQL Database
body: <p>I'm still getting used to using PHP and MYSQL so please bear with me.</p>
  
  <p>I have a database table called 'employee_datetable' that with a field called "datetime" contains 365 records of actual dates for the next year (August 13, 2014 to August 13, 2015).  </p>
  
  <p>I want to write a MYSQL query that retrieves 7 dates and displays them in a row while in readable format such as "Sept 24, 2014".  </p>
  
  <p>Right now the dates are stored as date types and displayed as "2014-09-24" etc.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p><strong>PHP Code</strong>:</p>
  
  <pre><code>$dates_sql = "SELECT UNIX_TIMESTAMP(datetime) FROM employee_datetable LIMIT 7"; 
  $PhpDate = strtotime($dates_sql);
  $FormattedPhpDate = date('M d, Y', $PhpDate );
  
  echo "Selected Dates from the query: " . $FormattedPhpDate;
  </code></pre>