It is narrated from Hazrat Adi bin Hatim (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: Whoever swears an oath about something and then sees something else better than it, he should do that which is better and offer expiation for his oath.
Hadith Referenceمسند احمد / أول مسند الكوفيين / 18251
Hadith Gradingحکم دارالسلام:حديث صحيح بطرقه وشواهده، م: 1651، وهذا إسناد ضعيف لجهالة عبدالله بن عمرو