I have xlsx tables and I use PhpSpreadsheet to parse them. One Column is date format. The problem is that PhpSpreadsheet returns the values from date-formatted cells in an unspecified format:
2-Jan-19 (in Excel) and 43467 (After Exporting)
And I need to save entire tables exactly as they look like in Excel Format, like "2-Jan-19" not "43467"
I've been read Retrieve Date From Table Cell, But it can't solve my problem
Below is the code I have right now:
        $spreadsheet = $reader->load($_FILES['berkas_excel']['tmp_name']);
        $sheetData = $spreadsheet->getSheet(0)->toArray();
        echo count($sheetData);
        for($i = 3;$i < count($sheetData) ;$i++)
        {
                $kode = $sheetData[$i]['0'];
                $tgl = $sheetData[$i]['1']; //This is where the Date Column 
                $shift_rec = $sheetData[$i]['2'];
                $grup = $sheetData[$i]['3'];
                $pekan = $sheetData[$i]['4'];
                $bulan = $sheetData[$i]['5'];
        }
I hope somebody can help me to get "2-Jan-19" as the result, so I can insert it into my DB after that,
Thanks to anyone who willing to answer/help my problem right now