#6 Date Frormating Poblem

open
nobody
5
2006-03-20
2006-03-20
Anonymous
No

I am using the excel reader on the attached file.
The two date fields are 2/28/2006 and 3/1/2006. After
executing the following code, the dates come out as
27/02/2006 and 28/02/2006 respectively.

require_once
('../../public/include/excel_reader/reader.php');
$data = new Spreadsheet_Excel_Reader();
$data->setOutputEncoding('CP1251');
$data->read
('../../public/include/excel_reader/dbtest2.xls');

//print a generic table of data
$data->print_rows('data');

Output:
ACCOUNT CUSIP SHARES CASH PAY DATE
123 091937839 2270.663 unknown 51.39 number
27/02/2006 date
456 957663305 unknown 255.677 unknown 9.30 number
28/02/2006 date

It recognizes the fact that it is a date but returns
an incorrect value.

my email is jameskelly@statestreet.com

Thanks,
Jim

Discussion

  • Test Data

     
    Attachments