Sayyiduna Abu Hurairah (may Allah be pleased with him) narrates this statement of the Noble Prophet (peace and blessings be upon him): "Whoever takes an oath and then sees something else as better than it, he should offer expiation for his oath and do that which is better."
Hadith Referenceصحیح ابن حبان / كتاب الأيمان / 4349
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «الإرواء» (2084): م.فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح على شرط مسلم