In csv cell contain date in format 31-Mar-90
. Now If that csv created on Windows + MS Excel 2007, my php scripts shows in same format ie: 31-Mar-90
but if same date format added in csv that created on some other platform then php shows like: 31 Mar 1990
script is
$row = 1;
if (($handle = fopen($filename, "r")) !== FALSE) {
while (($data = fgetcsv($handle, 0, ",")) !== FALSE) { //Reading the file
$num = count($data);
for ($c = 0; $c < $num; $c++) {
$csvData[$row][$c] = $data[$c];
}
$row++;
}
fclose($handle);
}
var_debug($csvData);
and once I open & save csv (created in other platform) in Windows MS-Excel 2007, php outputs 31-Mar-90
which is my requirement.
Here is csv: