Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
suyuti:1589a
Request/Fix translation

  

السيوطي:١٥٨٩a

"إذَا جَاءَ أحَدُكُمْ المسجدَ فليُصلِّ سَجْدَتينِ مِنْ قَبلِ أنْ يَجْلِسَ، ثم ليَقعُدْ بْعدُ إنْ شاءَ. أوْ لِيذْهبْ لحاجَتِه".  

[د] أبو داود عن أبي قتادة

See similar narrations below:

Collected by Abū Dāwūd
abudawud:467al-Qaʿnabī > Mālik > ʿĀmir b. ʿAbdullāh b. al-Zubayr > ʿAmr b. Sulaym al-Zuraqī > Abū Qatādah

Abu Qatadah reported the Messenger of Allah (May peace be upon him) as saying; when any one of you enters the mosque, he should pray two RAKAHS before sitting down.  

أبو داود:٤٦٧حَدَّثَنَا الْقَعْنَبِيُّ حَدَّثَنَا مَالِكٌ عَنْ عَامِرِ بْنِ عَبْدِ اللَّهِ بْنِ الزُّبَيْرِ عَنْ عَمْرِو بْنِ سُلَيْمٍ الزُّرَقِيِّ عَنْ أَبِي قَتَادَةَ

أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ إِذَا جَاءَ أَحَدُكُمُ الْمَسْجِدَ فَلْيُصَلِّ سَجْدَتَيْنِ مِنْ قَبْلِ أَنْ يَجْلِسَ