Jami` at-Tirmidhi, Book 2, Hadith 260 (Tirmidhi 408)

(Sabrah bin Ma'bad al-Juhni) narrated that:

Allah's Messenger (S) said: "Teach the boy Salat when he is seven years old, and beat him (if he does not pray) when he is ten."