Muwatta Malik #468
The Qibla
The Arabic includes the chain of narration (sanad) and the collector's commentary; the English translation shows the Prophet's words only.
وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ سَعِيدِ بْنِ الْمُسَيَّبِ، أَنَّهُ قَالَ صَلَّى رَسُولُ اللَّهِ صلى الله عليه وسلم بَعْدَ أَنْ قَدِمَ الْمَدِينَةَ سِتَّةَ عَشَرَ شَهْرًا نَحْوَ بَيْتِ الْمَقْدِسِ ثُمَّ حُوِّلَتِ الْقِبْلَةُ قَبْلَ بَدْرٍ بِشَهْرَيْنِ .
Yahya related to me from Malik from Yahya ibn Said that Said ibn
al-Musayyab said, "The Messenger of Allah, may Allah bless him and
grant him peace, prayed towards the Baytal-Maqdis for sixteen months
after arriving in Madina. Then the qibla was moved, two months before
the battle of Badr. "
About Muwatta Malik
This hadith is #468 from Muwatta Malik, in the Book of The Qibla.