Sayyiduna Abu Hurayrah (may Allah be pleased with him) narrates: The Prophet (peace and blessings be upon him) said: "Teach your children the prayer when they reach seven years of age; and when they reach ten years, beat them for (abandoning) the prayer, and separate their beds."
Al-Bazzar recorded it; its chain contains Muhammad bin al-Hasan al-Awfi, about whom it has been said that he is weak in hadith, or words to that effect. I have not found anyone who declared him trustworthy.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 1626