Hi, I'm using this library link
and I want to add a date and time filter that looks like this:
and in the BD the info is in the sgt structure: 2018-06-19 12:13:21
but when you put it in the cell it reads it as text and not as date
What have I tried?
$worksheet->setCellValue('I'.$i, $user->created);
$this->longitudCeldas('I', $user->created, $worksheet);
$worksheet->getCell('I'.$i)->setValueExplicit("'".$user->created."'",\PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_NUMERIC);
If I add the previous line, it reads it as a number, for which I think the solution is on this side.
$worksheet->getStyle('I'.$i)->getNumberFormat()->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_DATE_DATETIME);