Skip to content
This repository was archived by the owner on May 26, 2022. It is now read-only.
This repository was archived by the owner on May 26, 2022. It is now read-only.

Format date on export XLSX #880

@rsereir

Description

@rsereir

Hello,

I am looking for format date cell on export XLSX but i have ### in my cell ( with a good date formatting: filters and cell content are ok, it's just a wrong cell text )

I generate my cell like this:

public function formatDate(\DateTime $date)
    {
        $format = $this->localeFormat->getYearMonthDayFormat();

        return WriterEntityFactory::createCell(Date::PHPToExcel($date), (new StyleBuilder())->setFormat('dd/mm/YYYY')->build());
    }

I also tried this date format: m/d/yy h:mm and it's didn't working.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions