PHP code example of hypervix / excel-date-converter
1. Go to this page and download the library: Download hypervix/excel-date-converter library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hypervix / excel-date-converter example snippets
use Hypervix\ExeclDateConverter\ExeclDateConverter;
// Convert Excel serial date to timestamp
$dateConverter = ExeclDateConverter::date(44561);
echo $dateConverter->format('Y-m-d'); // Output: 2022-01-01
// Convert a standard date format
$dateConverter = ExeclDateConverter::date('31-12-2023');
echo $dateConverter->format('Y/m/d'); // Output: 2023/12/31