(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