"Sa'd was wounded on the day of Al-Khandaq when a man of Quraish shot him in the medial arm vein. The Messenger of Allah (ﷺ) pitched a tent (Khaimah) for him in the Masjid so that he could visit him close at hand."

Al-Khandaq means the trench. This indicates the battle of the trench which took place during the fifth year after Hijrah.
Sunan an-Nasa'i Book 8, Hadith 23