fork download
  1. <?php
  2.  
  3. function excelDateToDate($readDate){
  4. $phpexcepDate = $readDate-25569; //to offset to Unix epoch
  5. $timestamp = strtotime("+$phpexcepDate days", mktime(0,0,0,1,1,1970) / 1000);
  6. return date("d-m-Y", $timestamp);
  7. }
  8.  
  9.  
  10. echo excelDateToDate(41137);
Success #stdin #stdout 0.03s 24400KB
stdin
Standard input is empty
stdout
16-08-2012