src/Transformatika/Utility/Fn.php
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 '';
        }
    }
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 '';
        }
    }
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 '' ; } }
Date Form To SQL
@param  Date
@return DateSQL
Date Form To SQL