It is narrated from Sayyiduna Abu Huraira (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever catches one rak'ah of the Fajr prayer before the sun rises has caught the Fajr prayer, and whoever catches one rak'ah of the Asr prayer before the sun sets has caught the Asr prayer."
Related hadith on this topic