The ex-German international midfielder, represented by celebrity lawyer Nick Freeman's law firm, was charged with drink driving after positive breath and urine samples.
Embassy official who killed cyclist in hit-and-run sentenced to 10 years in prisonEmbassy official killed cyclist in hit-and-run on her way back from House of Lords functionDriver who blamed dying victim for Porsche crash jailed for seven yearsFailed businesswoman killed toddler after attempting suicideHe braked so sharply at a red light that his Range Rover ''lunged forward'', Trafford Magistrates' Court heard.
He appeared to be driving at excess speed and clipped the kerb three times, Pc Michael Connolly told the court.
He said: ''The defendant was weaving within the lane. When I stopped him I could smell alcohol on his breath.
''His eyes were glazed and he was unsteady on his feet. He was obstructive and quite abusive.''
When PC Connolly asked Hamann whether he was carrying any sharp instruments, the star joked that he had a knife, the court heard.
''Yes, a knife, which is now in my car,'' said the footballer, who was released by Manchester City at the end of last season.
The breathalyser reading was 62mg per 100ml of breath, while the legal limit is 35mg, so he was arrested and taken to Altrincham police station.
When he arrived he was slurring his speech, Pc David Trigg told the court.
He said he was desperate to go to the toilet but PC Trigg told him not to as he might not have enough urine left to provide a sample.
The officer discarded the first sample while the second was sent for analysis, as according to the rules, the court heard.
But Hamann was not allowed to empty his bladder in between the samples, his lawyer Jon Oultram told the court.
This meant the two samples were effectively the same, which is against the rules, said Mr Oultram, from Freeman and Co, the law firm famous for finding unusual technical defences.
The urine sample came back positive, with a reading of 187mg per 100ml of urine, while the legal limit is 107mg.
But Hamaan had not been to the toilet for more than five hours so it was effectively ''old urine'', Mr Oultram said.
Hamann, wearing a navy suit and brown leather shoes, told the court that he had drunk half a bottle of wine several hours before driving.
He said: ''I do not think it is possible to hit big kerbs without causing damage to my car.
''My car is a big car and there is not too much space in those lanes to weave about.
''I just drove as I normally do. I did not slur and I was not unsteady on my feet.''
The footballer said he found it difficult to hold his bladder at the police station.
''Everyone knows how hard it is to stop when you need a wee,'' he said.
Hamann was found guilty and banned from driving for 16 months.
Judge Mark Hadfield said he believed the samples were in fact separate, as there was a 10 minute gap between them.
"I am afraid the finding I make is that they were separate samples.
"I found Pc Trigg to be a very fair witness.
"I will have to increase the ban, which would have been 12 months, because you did not plead guilty." he said.
The judge said Hamann will also have to pay £1,990 in costs, which he was given 28 days to settle.
The court heard he has no regular income since being released from Manchester City, but relies on his "significant" savings and occasional coaching for his former club, Liverpool.
He also lost his licence in October 2007 for six months for a series of motoring offences.
He crashed his £70,000 Porsche Carrera into a fence and refused to tell police who was driving, despite officers catching him running away from the scene.