Answer the question
In order to leave comments, you need to log in
How to set date format like "27.02.2014 15:58" in PHPExcel?
Can you please tell me how to set the format for dates like: "02/28/2014 00:07", "05/26/2014 21:22"?
On maxibazar.eu/mbm2/application/plugins/excel/Docume... there is no required format, but somehow you need to sort by column.
In Excel itself, this is (all formats)->type->DD.MM.YYYY h:mm
Answer the question
In order to leave comments, you need to log in
It should work like this:
$page = $objPHPExcel->setActiveSheetIndex(0);
$page->setCellValue("A1", '27.02.2014 15:58');
$objPHPExcel->getActiveSheet()->getStyle('A1')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_DATETIME);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question