(a) Muhammad bin Abd al-Rahman bin Thawban narrates from Jabir bin Abdullah (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) stayed twenty days in Tabuk and kept shortening the prayer.
(b) Anas and Jabir (may Allah be pleased with them both) mention ten-odd (days).
Ma'mar alone narrated it with a connected chain (musnad); Ali bin al-Mubarak and others narrated it from Yahya, from Ibn Thawban, from the Prophet (peace and blessings be upon him) mursal. As for the version from al-Awza'i, from Yahya, from Anas, saying "ten-odd", I do not consider it mahfuz (preserved).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5473
Abu al-Zubayr narrates from Sayyiduna Jabir (may Allah be pleased with him): I took part in the expedition of Tabuk together with the Prophet (peace and blessings be upon him). He (peace and blessings be upon him) stayed there ten-odd (days), and he (peace and blessings be upon him) did not pray more than two rak'ahs until he returned.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5474
Mujahid narrates from Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) stayed forty days in Khaybar, praying two rak'ahs each.
Al-Hasan bin Umarah alone narrated it, and he is not relied upon as evidence.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5475
Nafi' narrates from Ibn Umar (may Allah be pleased with them both): Snow hemmed us in "while we were in Azerbaijan"; we remained six months on a campaign, and we kept praying two rak'ahs each.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5476
Salim bin Abdullah reports from his father, Abdullah bin Umar (may Allah be pleased with them both), (that he used to say): As long as I have not resolved to stay, I will keep praying the traveller's prayer, even if I have to remain for twelve nights.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5477
Al-Hasan (may Allah have mercy on him) narrates from Sayyiduna Abd al-Rahman bin Samurah (may Allah be pleased with him): We were with Sayyiduna Abd al-Rahman (may Allah be pleased with him) for two winters; we had not resolved to stay, so we used to shorten the prayer.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5478
Hafs bin Ubaydullah bin Anas narrates from Sayyiduna Anas (may Allah be pleased with him) that he stayed in Syria with Abd al-Malik bin Marwan for two months, and he kept praying the traveller's prayer.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5479
Yahya bin Abi Kathir narrates from Sayyiduna Anas (may Allah be pleased with him) that the Companions of the Messenger of Allah (peace and blessings be upon him) (may Allah be pleased with them) stayed in Ramhurmuz for nine months and kept shortening the prayer.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5480
Abd al-Rahman bin al-Miswar bin Makhramah (may Allah have mercy on him) said: I set out with my father, Sa'd bin Abi Waqqas (may Allah be pleased with him) and Abd al-Rahman bin al-Aswad bin Abd Yaghuth al-Zuhri in the year of Adhruh, and the plague broke out in Syria. We stayed at a place called Sargh for fifty nights. Ramadan began, and al-Miswar (may Allah be pleased with him) and Abd al-Rahman bin al-Aswad fasted, while Sa'd bin Abi Waqqas (may Allah be pleased with him) did not fast and refused to fast. I said to Sa'd (may Allah be pleased with him): "O Abu Ishaq! You are a Companion of the Prophet (peace and blessings be upon him) and took part in Badr; al-Miswar and Abd al-Rahman are fasting and you have not fasted?" Sa'd (may Allah be pleased with him) said: "I have more understanding (of the religion) than they do."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5481