public static function dateFormToSQL($date)
    {
        list($d, $m, $y) = @explode("/", $date);
        $month = (int)$m;
        $day   = (int)$d;
        $year  = (int)$y;
        if (checkdate($month, $day, $year)) {
            if ($day < 10) {
                $day = '0' . $day;
            }
            if ($month < 10) {
                $month = '0' . $month;
            }

            return $y . '-' . $month . '-' . $day;
        } else {
            return '';
        }
    }