Jami` at-Tirmidhi, Book 8, Hadith 49 (Tirmidhi 730)

Hafsah narrated that:

the Prophet said: "Whoever did not decide to fast before Fajr then there is no fast for him."