Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insertDate with standard format value changes the dates to show as numbers #544

Open
DAdq26 opened this issue Dec 12, 2024 · 1 comment
Open

Comments

@DAdq26
Copy link

DAdq26 commented Dec 12, 2024

Hi
The issue (#527) seems to be still active with php 8.3 and xlswriter 1.5.8 release..
On my own

image

image

Code to reproduce

image


<?php

use Vtiful\Kernel\Excel;

require_once "../External/autoload.php";

$excel = new Excel(['path' => dirname(__DIR__) . '/Cache']);

$dateFile = $excel->fileName("free.xlsx")
    ->header(['date']);
$dateFile->insertDate(1, 0, time(), 'yyyy-mm-dd hh:mm:ss');
$dateFile->output();

Expected result

date
2024-09-19 xx:xx:xx

Actual Result

date
45638.655

if i try your example here https://xlswriter-docs.viest.me/en/dan-yuan-ge/cha-ru-date


<?php
$excel = new \Vtiful\Kernel\Excel($config);

$dateFile = $excel->fileName("free.xlsx")
     ->header(['date']);

$dateFile->insertDate(1, 0, time(), 'mmm d yyyy hh:mm AM/PM');

$textFile->output();

The result is the same...

Any fix on your side?

Best

Originally posted by @DAdq26 in #527 (comment)

@DAdq26
Copy link
Author

DAdq26 commented Jan 16, 2025

up ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant