I am using phpexcel to read specific set of data from a excel sheet into an array.
// example $cell_range = 'A2:AH35';
$cell_collection = $objPHPExcel->getActiveSheet()->rangeToArray($cell_range, NULL, True, TRUE);
In this sheet, two columns (L & N) contain dates formates as dd-mmm-yy (01-Jan-16). In order to upload this into database I need to convert this to format yyyy-mm-dd (2016-01-01).
I cannot simply change the last parameter of rangeToArray to FALSE (formatting retention), because that will just give me a set of x numbers instead of the date.
So how do if reformat the dates? Can be either on the level of phpexcel reading the data or by manupulating the resulting $cell_collection array.