Geoffrey Curran, from Ard Lonan, Long Lane in Letterkenny was arrested by Gardai, Letterkenny District Court heard.
He had earlier smashed a glass panel at premises in Meadowbank Park on November 7 last year.
When Gardai arrived at the scene, he was covered in blood from an injury he had caused himself during the incident.
Inspector David Murphy told the court that Curran had been banging on the door of his neighbour because he had gone to the wrong house.
“He believed it was his house,” said the Inspector.
“Unfortunately there have been similar other incidents.”
Judge Paul Kelly adjourned sentencing in the case.