وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ سَعِيدِ بْنِ الْمُسَيَّبِ، أَنَّهُ قَالَ صَلَّى رَسُولُ اللَّهِ صلى الله عليه وسلم بَعْدَ أَنْ قَدِمَ الْمَدِينَةَ سِتَّةَ عَشَرَ شَهْرًا نَحْوَ بَيْتِ الْمَقْدِسِ ثُمَّ حُوِّلَتِ الْقِبْلَةُ قَبْلَ بَدْرٍ بِشَهْرَيْنِ ‏.‏

Yahya related to me from Malik from Yahya ibn Said that Said ibnal-Musayyab said, "The Messenger of Allah, may Allah bless him andgrant him peace, prayed towards the Baytal-Maqdis for sixteen monthsafter arriving in Madina. Then the qibla was moved, two months beforethe battle of Badr. " Translation Not Available

Book Ref: Muwatta Imam Malik Book 14 Hadith 464
Web Ref:  Muwatta Imam Malik Book 14 Hadith 7