Sunan Ibn Majah, Volume 2, Book 7, Hadith 1772 (DarusSalam) ⓘ
It was narrated from ‘Umar that he had vowed during the Ignorance days to spend one night in I’tikaf. He asked the Prophet about it, so he commanded him to spend it in I’tikaf.
حَدَّثَنَا إِسْحَاقُ بْنُ مُوسَى الْخَطْمِيُّ، حَدَّثَنَا سُفْيَانُ بْنُ عُيَيْنَةَ، عَنْ أَيُّوبَ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، عَنْ عُمَرَ، أَنَّهُ كَانَ عَلَيْهِ نَذْرُ لَيْلَةٍ فِي الْجَاهِلِيَّةِ يَعْتَكِفُهَا فَسَأَلَ النَّبِيَّ ـ صلى الله عليه وسلم ـ فَأَمَرَهُ أَنْ يَعْتَكِفَ .
also referenced under: Hadith 1772 (Reference) & Book 7, Hadith 1844 (In-Book)