private function formatDate(\DateTime $dateTime)
    {
        return $dateTime->format(\Magento\Framework\DB\Adapter\Pdo\Mysql::DATE_FORMAT);
    }
private function formatDate(\DateTime $dateTime)
    {
        return $dateTime->format(\Magento\Framework\DB\Adapter\Pdo\Mysql::DATE_FORMAT);
    }
private function formatDate ( \ DateTime $ dateTime ) { return $ dateTime -> format ( \ Magento \ Framework \ DB \ Adapter \ Pdo \ Mysql :: DATE_FORMAT ) ; }
Format a DateTime object to proper format for DB saving.

@param \DateTime $dateTime Date time

@return string
Format a DateTime object to proper format for DB saving .