public function toSqlDate(DateTimeInterface $date, Provider $provider = null) : string
    {
        $this->setParameterProvider($provider);

        return $date->format($provider->getDateFormat());
    }
public function toSqlDate(DateTimeInterface $date, Provider $provider = null) : string
    {
        $this->setParameterProvider($provider);

        return $date->format($provider->getDateFormat());
    }
public function toSqlDate ( DateTimeInterface $ date , Provider $ provider = null ) : string { $ this -> setParameterProvider ( $ provider ) ; return $ date -> format ( $ provider -> getDateFormat ( ) ) ; }
Converts a PHP date time to an SQL date

@param DateTimeInterface $date The date time to convert
@param Provider $provider The provider to convert to
@return string The SQL date suitable for database storage
Converts a PHP date time to an SQL date