It is narrated from Sayyiduna Sabrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "The child is to be ordered to pray when he reaches seven years, and when he reaches ten, beat him for it (for not praying)."
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 6517