Amr bin Shu'ayb narrates from his father, and he from his grandfather (may Allah be pleased with them both), that the Messenger of Allah (peace and blessings be upon him) said: "Command your children to pray at the age of seven, and at the age of ten make them pray, even by smacking them, and separate their beds."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5092