Sunan an-Nasa'i, Hadith 1998 ⓘ
It was narrated that Abu Sa'eed said: "The Messenger of Allah said: 'If you see a funeral, then stand up, and whoever follows it, then let him not sit down until (the body) is placed in the grave."'
أَخْبَرَنَا سُوَيْدُ بْنُ نَصْرٍ، قَالَ أَنْبَأَنَا عَبْدُ اللَّهِ، عَنْ هِشَامٍ، وَالأَوْزَاعِيِّ، عَنْ يَحْيَى بْنِ أَبِي كَثِيرٍ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي سَعِيدٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " إِذَا رَأَيْتُمُ الْجَنَازَةَ فَقُومُوا وَمَنْ تَبِعَهَا فَلاَ يَقْعُدَنَّ حَتَّى تُوضَعَ " .
also referenced under: Book 21, Hadith 182 (In-Book) & Volume 3, Book 21, Hadith 2000 (DarusSalam)