for converting mm/dd/yy to yyyy-mm-dd, I used this code
list($d, $m, $y) = preg_split('/\//', $normal_date);
$mydate = sprintf('%4d%02 d%02d', $y, $m, $d);
print $mydate;
following date is not converted
10/20/2011 ( that is to say, if both month and date are 2 digts)
whereas rest of the excel dates are being converted
2/12/2011
6/10/2011
pl help
list($d, $m, $y) = preg_split('/\//', $normal_date);
$mydate = sprintf('%4d%02 d%02d', $y, $m, $d);
print $mydate;
following date is not converted
10/20/2011 ( that is to say, if both month and date are 2 digts)
whereas rest of the excel dates are being converted
2/12/2011
6/10/2011
pl help
Comment