Sabrah bin Ma'bad Al-Juhani (May Allah be pleased with him) reported:
Messenger of Allah (ﷺ) said, "Teach a boy Salat (the prayer) when he attains the age of seven years, and punish him (if he does not offer it) at ten".[Abu Dawud and Tirmidhi].The narration in Abu Dawud is: Messenger of Allah (ﷺ) said, "Order a boy to perform Salat (the prayer) when he is seven years old".
Arabic/English book reference: Book 1, Hadith 302