Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Date problem.. haven't seen this before.

Help
Anonymous
2011-07-18
2013-05-02

  • Anonymous
    2011-07-18

    Hey,

    Great class. I'm running simple code and printing out the sheet, but my date column is _totally_ wrong. It's not just out of place, or off date, it's been converted to a solid integer - and it's not just a random #. For example, one day will be "40725" and another will be 40726 - clearly a pattern, just can't figure it out.

     

  • Anonymous
    2013-03-15

    I modified the reader.php file changing at line 634:

                                    if ($formatstr) {
                                        if (strlen($formatstr)>=11) {
                                            $formatstr=substr($formatstr,0,10);
                                        }
                                        if (preg_match("//i", $formatstr) == 0) { // found day and time format
                                            $isdate = TRUE;
                                            $formatstr = str_replace('mm', 'i', $formatstr);
                                            $formatstr = str_replace('h', 'H', $formatstr);
                                            $formatstr = str_replace('DD', 'd', $formatstr);
                                            $formatstr = str_replace('MM', 'm', $formatstr);
                                            $formatstr = str_replace('YYYY', 'Y', $formatstr);
                                            //echo "\ndate-time $formatstr \n";
                                        }
                                    }