While the Messenger of Allah ﷺ and I were leaving the mosque, we met a man at the entrance of the mosque. He asked, "Messenger of Allah, when is the Hour?"The Messenger of Allah ﷺ replied, "What have you prepared for it?"The man seemed humbled, then said, "Messenger of Allah, I have not prepared much in the way of prayer, fasting, or charity, but I love Allah and His Messenger."He said, "Then you will be with those you love."
بينما أنا ورسول الله ﷺ خارجين من المسجد، فلقينا رجلا عند سدة المسجد، فقال: يا رسول الله متى الساعة؟ قال رسول الله ﷺ: ما أعددت لها؟ قال فكأن الرجل استكان، ثم قال: يا رسول الله ما أعددت لها كبير صلاة ولا صيام ولا صدقة، ولكني أحب الله ورسوله، قال: فأنت مع من أحببت.
Bukhari reported it in Ahkam (7153), and Muslim in Birr wa Sila (2639: 164), from Uthman bin Abu Shayba, who said, Jareer narrated to us, from Mansur, from Salim bin Abu Jaad, who said, Anas bin Malik narrated to us, and he mentioned it.