Sunan an-Nasa'i, Book 21, Hadith 99 (In-Book) ⓘ
It was narrated form 'Amir bin Rabi'ah Al-'Adawi that the Messenger of Allah said: "When you see a funeral, stand up until it has passed you, or (the body) is placed (in the grave)."
أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا اللَّيْثُ، عَنِ ابْنِ شِهَابٍ، عَنْ سَالِمٍ، عَنْ أَبِيهِ، عَنْ عَامِرِ بْنِ رَبِيعَةَ الْعَدَوِيِّ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّهُ قَالَ " إِذَا رَأَيْتُمُ الْجَنَازَةَ فَقُومُوا حَتَّى تُخَلِّفَكُمْ أَوْ تُوضَعَ " .
also referenced under: Hadith 1916 (Reference) & Volume 3, Book 21, Hadith 1917 (DarusSalam)