Sunan an Nasai 1438
The Book of Shortening the Prayer When Traveling
أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا أَبُو عَوَانَةَ، عَنْ يَحْيَى بْنِ أَبِي إِسْحَاقَ، عَنْ أَنَسٍ، قَالَ خَرَجْتُ مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم مِنَ الْمَدِينَةِ إِلَى مَكَّةَ فَلَمْ يَزَلْ يَقْصُرُ حَتَّى رَجَعَ فَأَقَامَ بِهَا عَشْرًا .
It was narrated that Anas said:"I went out with the Messenger of Allah (ﷺ) from Al-Madinah to Mekkah, and he continued to shorten his prayers, and he stayed there for ten days
Grading: Abu Ghuddah: Sahih · Al-Albani: Sahih · Zubair Ali Zai: Sahih - Agreed Upon
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.