Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Date.php
public static function dateTimeToExcel(DateTimeInterface $dateValue)
    {
        return self::formattedPHPToExcel(
            $dateValue->format('Y'),
            $dateValue->format('m'),
            $dateValue->format('d'),
            $dateValue->format('H'),
            $dateValue->format('i'),
            $dateValue->format('s')
        );
    }
public static function dateTimeToExcel(DateTimeInterface $dateValue)
    {
        return self::formattedPHPToExcel(
            $dateValue->format('Y'),
            $dateValue->format('m'),
            $dateValue->format('d'),
            $dateValue->format('H'),
            $dateValue->format('i'),
            $dateValue->format('s')
        );
    }
public static function dateTimeToExcel ( DateTimeInterface $ dateValue ) { return self :: formattedPHPToExcel ( $ dateValue -> format ( 'Y' ) , $ dateValue -> format ( 'm' ) , $ dateValue -> format ( 'd' ) , $ dateValue -> format ( 'H' ) , $ dateValue -> format ( 'i' ) , $ dateValue -> format ( 's' ) ) ; }
Convert a PHP DateTime object to an MS Excel serialized date/time value.

@param DateTimeInterface $dateValue PHP DateTime object

@return float MS Excel serialized date/time value
Convert a PHP DateTime object to an MS Excel serialized date / time value .