Hasani Chakron, 24, of no fixed address, was sentenced at Wood Green Crown Court on Tuesday, 1 December.
He pleaded guilty to escaping lawful custody, possession of a Class A drug, theft by finding and being in possession of another person’s identity document.
The court heard that on Wednesday, 19 February, Chakron was arrested after being caught with crack cocaine in Tottenham High Road, N17.
Officers carried out a search and also found he was in possession of identity documents that did not belong to him and a rucksack that had been reported stolen earlier that day.
Chakron was taken to Wood Green Custody Centre where he became unwell. He was taken by ambulance to the North Middlesex Hospital where upon arriving he ran away from officers and was not found.
Detectives began a search to locate him. They worked closely with local pubs and businesses in the area where he was thought to have been hiding.
On Saturday, 22 February Chakron was seen on Tottenham High Road. He was stopped by police and arrested.
Detective Constable Emma Stewart, of North Area CID, said: “This was a brazen escape from lawful custody whereby Chakron was unlawfully at large for a number of days. An operation to locate him was launched immediately and we worked hard to locate him and bring him to justice.
“Members of the local community assisted the investigation and, as always, we are grateful for their support.’’