src/Transformatika/Utility/Fn.php
public static function dateSQLToForm($date)
    {
        //if (!empty($date) && $date != "0000-00-00" && $date != "0000-00-00 00:00:00"){
        if ($this->isDateSQL($date)) {
            $arr = explode('-', $date);
            $thn = (int)$arr[0];
            $bln = (int)$arr[1];
            $tgl = (int)$arr[2];

            if ($thn > 2000 AND $bln <= 12 AND $bln >= 1 AND $tgl <= 31 AND $tgl >= 1) {
                if ($tgl < 10) $tgl = '0' . $tgl;
                if ($bln < 10) $bln = '0' . $bln;
                if ($thn < 10) $thn = '0' . $thn;

                return $tgl . '/' . $bln . '/' . $thn;
            }
        }

        return '';
    }
public static function dateSQLToForm($date)
    {
        //if (!empty($date) && $date != "0000-00-00" && $date != "0000-00-00 00:00:00"){
        if ($this->isDateSQL($date)) {
            $arr = explode('-', $date);
            $thn = (int)$arr[0];
            $bln = (int)$arr[1];
            $tgl = (int)$arr[2];

            if ($thn > 2000 AND $bln <= 12 AND $bln >= 1 AND $tgl <= 31 AND $tgl >= 1) {
                if ($tgl < 10) $tgl = '0' . $tgl;
                if ($bln < 10) $bln = '0' . $bln;
                if ($thn < 10) $thn = '0' . $thn;

                return $tgl . '/' . $bln . '/' . $thn;
            }
        }

        return '';
    }
public static function dateSQLToForm ( $ date ) { //if (!empty($date) && $date != "0000-00-00" && $date != "0000-00-00 00:00:00"){
 if ( $ this -> isDateSQL ( $ date ) ) { $ arr = explode ( '-' , $ date ) ; $ thn = ( int ) $ arr [ 0 ] ; $ bln = ( int ) $ arr [ 1 ] ; $ tgl = ( int ) $ arr [ 2 ] ; if ( $ thn > 2000 AND $ bln <= 12 AND $ bln >= 1 AND $ tgl <= 31 AND $ tgl >= 1 ) { if ( $ tgl < 10 ) $ tgl = '0' . $ tgl ; if ( $ bln < 10 ) $ bln = '0' . $ bln ; if ( $ thn < 10 ) $ thn = '0' . $ thn ; return $ tgl . '/' . $ bln . '/' . $ thn ; } } return '' ; }
SQL Date To Date Form
@param  Date
@return Date
SQL Date To Date Form