Timeline: Duke of Edinburgh's health
Prince Philip has appeared in public with his right hand bandaged following what Buckingham Palace described as a "minor procedure".
The 92-year-old duke has had a series of health problems in recent years.
The Duke of Edinburgh had an operation on his right hand inside Buckingham Palace on 20 May.
A day later, he continued his engagements as planned, which included attending a garden party at Buckingham Palace.
Prince Philip was admitted to the private London Clinic on 6 June after attending a Buckingham Palace garden party.
The pre-arranged exploratory operation was carried out the next day and followed abdominal investigations.
He spent his 92nd birthday in hospital and on the day, he received a visit from the Queen.
He left hospital after 11 nights and was said by Buckingham Palace to be "in good condition and good spirits". The palace said he would spend "a period of convalescence, of approximately two months".
He undertook his first public engagement since the operation on 12 August, handing out medals at the Royal Society of Edinburgh and saying it was "a great pleasure to be back in circulation again".
The duke was taken to hospital as a precautionary measure after a bladder infection recurred.
He had been staying at Balmoral with the Queen and was driven by ambulance to Aberdeen Royal Infirmary, Buckingham Palace said.
The bladder infection first affected the Duke during the Queen's Diamond Jubilee celebrations.
The duke was treated at King Edward VII Hospital, London. He had been standing with the Queen on the royal barge for most of an 80-minute journey along the Thames.
The flotilla of 1,000 boats braved dismal weather as it travelled seven miles down the river to Tower Bridge.
Prince Philip subsequently missed the Diamond Jubilee concert, which featured Robbie Williams, Annie Lennox and Sir Tom Jones, and the national service of thanksgiving at St Paul's Cathedral.
Having suffered chest pains, the duke was admitted to Papworth Hospital in Cambridgeshire.
Doctors successfully performed a "minimally invasive procedure of coronary stenting", Buckingham Palace said,
The procedure involves pushing a balloon into a blocked artery and inflating it. The stent is a metal sleeve fitted over the balloon, which remains inside the body when the balloon is removed.
The Royal Family had gathered at Sandringham, a traditional royal retreat in Norfolk, for Christmas.
Poignantly, the Queen's Christmas Day broadcast to the nation, recorded before her husband's treatment, highlighted the importance of the family unit.
The duke pulled out of a trip to Italy, where he was due to attend a meeting of an environmental organisation that brings together the world's major religions, because he was suffering from a cold.
The Queen and the duke had just returned from an 11-day tour of Australia.
Carpal tunnel syndrome, a common condition that can cause pain and numbness, was the cause of a minor operation in 2010.
Admitted as a day patient at an undisclosed hospital, the duke missed an evening dinner engagement in the City and a subsequent royal visit to Crewe.