The Prophet ﷺ was brought some old dates, and he began inspecting them, removing the weevils from them. In another wording, "It contained worms."
أتي النبي ﷺ بتمر عتيق، فجعل يفتشه يخرج السوس منه. وفي لفظ: فيه دود.
Abu Dawud (3832) and Ibn Majah (3333) narrated it through Salm bin Qutayba Abu Qutayba, from Hammam, from Ishaq bin Abdullah bin Abu Talha, from Anas bin Malik, who related it. Ibn Majah's version does not include, "the weevils come out of it." The other wording was narrated by Abu Dawud right after it, from Muhammad bin Kathir, who said, Hammam narrated to us with his chain. Its chain of transmission is sahih. Hammam is Ibn Yahya Awdhi.As for what was reported from Ibn Umar, who said, "The Messenger of Allah ﷺ forbade inspecting dates for what might be in them," this is daif. It was narrated by Tabarani in al-Kabir (13787) and Bayhaqi in Shuab (5883) through Muhammad bin Bakkar, who said, Ismail bin Zakariya narrated to us, from Qays bin Rabi, from Jabala bin Suhaym, from Ibn Umar, who related it. Its chain of transmission is daif because of Qays bin Rabi.Haythami said in al-Majma (5/42), "Tabarani narrated it in al-Awsat, and it contains Qays bin Rabi, whom Shuba and Thawri deemed reliable, while Yahya Qattan deemed him daif, and the rest of its narrators are reliable." He attributed it to al-Awsat this way, but I think this was a slip of the pen, for I did not find it there nor in Majma Bahrayn.It has another chain that is not something to be pleased with, also extracted by Tabarani in al-Kabir (13830) and Bayhaqi in Shuab (5885), through Dawud bin Zubarqan, from Hafs bin Imran Kindi, from Habib bin Abu Thabit, from Ibn Umar, in a similar wording. Dawud bin Zubarqan is discarded as a narrator, and Azdi accused him of lying.