Insert date

Function Prototype

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

int $row

cell row

int $column

cell column

int $timestamp

Timestamp to write

string $dataFormat

time formatting characters

Default: yyyy-mm-dd hh:mm:ss

resource $formatHandler

cell style


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

$dateFile = $excel->fileName("free.xlsx")

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


Time Format Character Example

For more styles, please refer to the Excel Microsoft documentation.

"mmm d yyyy"
"d mmmm yyyy"
"dd/mm/yyyy hh:mm AM/PM"

Last updated