Sahih al-Bukhari, Book 9, Hadith 33 (Bukhari 544)

Narrated Abu Huraira:

Allah's Messenger (ﷺ) said, "If anyone of you can get one rak`a of the `Asr prayer before sunset, he should complete his prayer. If any of you can get one rak`a of the Fajr prayer before sunrise, he should complete his prayer."