It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that someone (so-and-so, son of so-and-so, son of al-Jarud) asked him: "Did the Messenger of Allah (peace and blessings be upon him) use to pray the forenoon prayer (Duha)?" He replied: "I never saw him (peace and blessings be upon him) pray the forenoon prayer except on one day; on that one day he (peace and blessings be upon him) prayed two rak'ahs."
Ahmad bin Mani' recorded it with a sahih (authentic) chain, while with Abu Ya'la and Ahmad bin Hanbal it is reported with these words: "Sayyiduna Anas (may Allah be pleased with him) never saw the Messenger of Allah (peace and blessings be upon him) pray the forenoon prayer except when he (peace and blessings be upon him) was setting out on a journey or returning from a journey (that is, he would pray it on coming to the mosque at the start or end of a journey)."