code: 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')
          );
      }
docs: 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