The Book of Oaths and Vows
35/36. Chapter:
If A Person Makes A Vow Then Becomes Muslim Before Fulfilling It
Sunan an-Nasai
أَخْبَرَنَا أَحْمَدُ بْنُ عَبْدِ اللَّهِ بْنِ الْحَكَمِ، قَالَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، قَالَ حَدَّثَنَا شُعْبَةُ، قَالَ سَمِعْتُ عُبَيْدَ اللَّهِ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ عُمَرَ، كَانَ جَعَلَ عَلَيْهِ يَوْمًا يَعْتَكِفُهُ فِي الْجَاهِلِيَّةِ فَسَأَلَ رَسُولَ اللَّهِ صلى الله عليه وسلم عَنْ ذَلِكَ فَأَمَرَهُ أَنْ يَعْتَكِفَهُ .
It was narrated from Ibn 'Umar that 'Umar had vowed -during the Jahiliyyah- to spend a day in 'Itikaf. He asked the Messenger of Allah about that, and he commanded him to perform the 'Itikaf.
Reference : Sunan an-Nasa'i 3822In-book reference : Book 35, Hadith 62English translation : Vol. 4, Book 35, Hadith 3853