Insert date

insertDate(int $row, int $column, int $timestamp[, string $dateFormat = 'yyyy-mm-dd hh:mm:ss', resource $formatHandler])

cell row

cell column

Timestamp to write

time formatting characters
Default: yyyy-mm-dd hh:mm:ss

cell style

$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();

For more styles, please refer to the Excel Microsoft documentation.
"mm/dd/yy"
"mmm d yyyy"
"d mmmm yyyy"
"dd/mm/yyyy hh:mm AM/PM"
Copy link
On this page
Function Prototype
int $row
int $column
int $timestamp
string $dataFormat
resource $formatHandler
example
Time Format Character Example