Cakephp- Date Conversion while reading from excel sheet -


using cakephp, reading excel sheet (i'm using libre office) , date not converted properly.

i'm using php spreadsheet excel reader import excel sheet database.

i'm not using functions convert date given in excel sheet.

in excel sheet date have given 04/10/2013 converted format (aprapr/wedwed/2013201320132013). want exact date have given in excel sheet.

i'm adding code here:

        $excel = new spreadsheet_excel_reader(www_root . 'files/excel/' . $this->request->data['request']['file_name'], true);         $excel->setutfencoder('iconv');         $excel->setoutputencoding('utf-8');         $excel->read(www_root . 'files/excel/' . $this->request->data['request']['file_name']);         $x = 2;         $sep = ",";         ob_start();         while ($x <= $excel->sheets[0]['numrows']) {             $y = 1;             $row = "";             while ($y <= $excel->sheets[0]['numcols']) {                 echo $excel->sheets[0]['cells'][$x][4];                 $cell = isset($excel->sheets[0]['cells'][$x][$y]) ? $excel->sheets[0]['cells'][$x][$y] : '';                 $row.=($row == "") ? "\"" . $cell . "\"" : "" . $sep . "\"" . $cell . "\"";                 $y++;             }             echo $row . "\n";             $x++;         }          $fp = fopen(www_root . "files/excel/data.csv", 'w');         fwrite($fp, ob_get_contents());         fclose($fp);         ob_end_clean();         $filehandle = fopen(www_root . "files/excel/data.csv", "r");         fgetcsv($filehandle, 1000, ",");         while (($data = fgetcsv($filehandle, ",")) !== false) {     pr($data);     } 

please help!!! in advance


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -