"Having said that" vs. "That being said" [duplicate]

I want to know the meanings of these phrases Having said that and That being said, the difference between them, and in which context I can use both of them.

According to my first understanding of these expressions, I think they are equivalent to the phrase "Considering what was said before" or in "reference to what has already been said". I am not sure of the meaning, but hope to find its exact meaning.


They are both well-understood idioms, mostly used in a context in which you are about to state a paradox, or contradiction, e.g.:

John failed all his A levels. But having said that he is highly literate in matters of IT and has found a well paid job immediately.

England are underdogs for their opening World Cup fixture against Italy. That being said it is not unknown for the Italians to lose an opening match against ranked outsiders, such as when they were beaten by Ireland in New York in 1994.

Both of them mean, and could easily be replaced with 'Notwithstanding that...'