It was narrated from 'Adi bin Hatim that :
the Messenger of Allah (ﷺ), said: "Whoever swears an oath then sees that something else is better than it, let him do that which is better and offer expiation for what he swore about. "
English reference: Vol. 3, Book 11, Hadith 2108
Arabic reference: Book 11, Hadith 2186
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.