I am trying to export time column as a Excel time format but for some reason It doesn´t work.
$array_tytan_info_ntt= TYTAN_INFO_NTT::whereDate('fec_startdate', '>=', $variable)
->selectRaw(" TIME(fec_startdate) as 'STARTDATE1' ")
->get();
$excel_tytan_info_ntt = json_decode( json_encode($array_tytan_info_ntt), true);
Excel::create('ntts_mes_'.Carbon::now()->toDateTimeString(), function($excel) use($excel_tytan_info_ntt) {
$excel->sheet('nttsmes', function($sheet) use($excel_tytan_info_ntt) {
$sheet->setColumnFormat(array(
'A' => 'hh:mm:ss',));
$sheet->fromArray($excel_tytan_info_ntt);
});
})->export('xls');
As you can see, return as a String.
Expected behaviour
Many thanks for any help. Regards.