title: DateTime config php
body: <p>In my MSSQL Database Table the Column time is written in Dec 10 2019 10:02PM and the Data Type of the column is varchar(100)</p>
  
  <blockquote>
    <p>Uncaught Exception: DateTime::__construct(): Failed to parse time string 
    (WedEurope/Berlin2019-12-11T12:23:53+01:00 11 2019 12:23PMDec)
    at position 0 (W): The timezone could not be found in the database in</p>
  </blockquote>
  
  <pre><code>$_TimeColumn = "time"; // Column name that contains the Date/Time
  
  $_DateFormat = "%h:%i:%s"; 
  
  function _DateString($hi)
  {
      global $_DateFormat;
      $now = new DateTime(date("Y-m-d H:i:s"));
      $det = new DateTime(date($hi));
  
      return $now-&gt;diff($det)-&gt;format($_DateFormat);
  }
  </code></pre>