title: PHP Date Export To CSV Format
body: <p>After export and when I open the CSV up, you'll notice column L formats only some of the dates properly. This happend on a couple other date columns as well. Is there anything I can do with PHP to ensure all dates are returned properly? Below id my function:</p>
  
  <pre><code>public function formatDateCI($date) {
  
      // If Birthdate Column
      if(strlen($date) == 10){
          $date = explode('-',$date);
          $m = $date[0];
          $d = $date[1];
          $Y = $date[2];
          $date = $Y.'-'.$m.'-'.$d;
      }
  
      $date = new DateTime($date);
      // Final Format 1983-24-12 00:00:00
      return date_format($date, 'Y-d-m H:i:s');
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/SPXjn.jpg" alt="Column L Date Format Issue"></p>