When a car was stopped while in Banbridge a police search of the vehicle uncovered cannabis and Diazepam tablets in a mobile phone box.
Ciaran Michael Malalchy Fitzsimmons, Ballynafoy Close, Belfast, admitted unlawful possession of a class B drug, cannabis, and unlawful possession of a class C drug, Diazepman, on July 12 last year.
For both offences he was put on probation for 18 months.
The court heard that at 1.30am he was stopped in Banbridge and police could smell cannabis in the car.
Fitzsimmons was alone in the vehicle.
A search uncovered a quantity of cannabis and eight Diazepam tablets in a mobile phone box.
A solicitor representing the defendant said his client had received 160 hours community services at other courts in April of this year.
He added that Fitzimmons had already completed 45 of those hours working with local church groups.
The solicitor said the defendant was not prescribed medication and there was no suggestion of him smoking while driving.
He explained that his client had been in Banbridge for the bonfire celebrations before returning to Belfast.
District Judge, Mr Paul Copeland, said Fitzsimmons was a suitable candidate for probation.