Prince Philip will be seen in public for the first time in two months when he visits the Royal Society of Edinburgh on 12 August, to present medals before joining the Queen at Balmoral.
The prince, 92, had surgery in June and spent 11 nights at the London Clinic. He was admitted on 6 June.
The BBC reports he will travel to Edinburgh from the Queen's Sandringham estate in Norfolk, where he has been recuperating.
Prince Philip is an honorary fellow of the Royal Society of Edinburgh, which was established in 1783.
After the engagement he will join the Queen for their summer holiday at Balmoral, her private estate in the Scottish Highlands.