ENOfficial
It was narrated that Al-Bara' said: "We prayed toward Bait Al-Maqdis (Jerusalem) with the Messenger of Allah (ﷺ) for sixteen or seventeen months - Safwan was not sure - then it was changed to the Qiblah."
Source: sunnah.com
Other translations
Arabic
أَخْبَرَنَا مُحَمَّدُ بْنُ بَشَّارٍ، قَالَ حَدَّثَنَا يَحْيَى بْنُ سَعِيدٍ، حَدَّثَنَا سُفْيَانُ، قَالَ حَدَّثَنَا أَبُو إِسْحَاقَ، عَنِ الْبَرَاءِ، قَالَ صَلَّيْنَا مَعَ النَّبِيِّ صلى الله عليه وسلم نَحْوَ بَيْتِ الْمَقْدِسِ سِتَّةَ عَشَرَ شَهْرًا أَوْ سَبْعَةَ عَشَرَ شَهْرًا - شَكَّ سُفْيَانُ - وَصُرِفَ إِلَى الْقِبْلَةِ .
sunnah.com