public static function ddmmyyyyToMysql($p_date)
    {
        if ($p_date !== null && $p_date != '') {
            $format = 'd/m/Y H:i:s';
            $date = \DateTime::createFromFormat($format, $p_date);
            if ($date === false) {
                $format = 'd/m/Y H:i';
                $date = \DateTime::createFromFormat($format, $p_date);
            }
            if ($date !== false) {
                return $date->format('Y-m-d H:i:s');
            }
        }
        return null;
    }