public static function convertDate($sourceFormat, $targetFormat, $value) {
        $dateObject = date_create_from_format($sourceFormat, $value);
        if ($dateObject) {
            return $dateObject->format($targetFormat);
        } else {
            return null;
        }
    }
public static function convertDate($sourceFormat, $targetFormat, $value) {
        $dateObject = date_create_from_format($sourceFormat, $value);
        if ($dateObject) {
            return $dateObject->format($targetFormat);
        } else {
            return null;
        }
    }
public static function convertDate ( $ sourceFormat , $ targetFormat , $ value ) { $ dateObject = date_create_from_format ( $ sourceFormat , $ value ) ; if ( $ dateObject ) { return $ dateObject -> format ( $ targetFormat ) ; } else { return null ; } }
Convert a date from one format to another

@param $sourceFormat
@param $targetFormat
@param $value
Convert a date from one format to another