title: Phpspreadsheet - Time cell retrieved as float
body: <p>I have an excel file which has a time input. </p>
  
  <pre><code>  Mar 01, 2018  | Thursday  | 8:00 AM | 5:00 PM
    Mar 02, 2018  | Friday    | 8:00 AM | 5:00 PM
  </code></pre>
  
  <p>But when my code tries to read those cells, the output becomes a float (for example <code>8:00 AM</code> becomes <code>0.33333333333333</code>). This is my code</p>
  
  <pre><code>$date = $sheet-&gt;getCell("A".$row)-&gt;getValue();
  $time_in = $sheet-&gt;getCell("C".$row)-&gt;getValue();
  $time_out = $sheet-&gt;getCell("D".$row)-&gt;getValue();
  
  echo "date: ".$date.          //Mar 01, 2018
       " time_in: ".$time_in.   //becomes 0.333333333333333
       " time_out: ".$time_out; //becomes 0.708333333333333
  </code></pre>
  
  <p>How can I make the output as is without the phpspreadsheet changing the value? I have tried looking at the phpspreadsheet documentation but I haven't found a solution.</p>