Sahih Muslim , Book 13, Hadith 251 (In-Book)

'Imran b. Husain (Allah be pleased with them) reported that the Messenger of Allah said to him (or he said to another person and he was listening to it): O, so and so, did you observe fast in the middle of the month? He said: No. Thereupon he (the Messenger of Allah) said: When you break it, then observe fast for two days.

وَحَدَّثَنِي عَبْدُ اللَّهِ بْنُ مُحَمَّدِ بْنِ أَسْمَاءَ الضُّبَعِيُّ، حَدَّثَنَا مَهْدِيٌّ، - وَهُوَ ابْنُ مَيْمُونٍ - حَدَّثَنَا غَيْلاَنُ بْنُ جَرِيرٍ، عَنْ مُطَرِّفٍ، عَنْ عِمْرَانَ بْنِ حُصَيْنٍ، - رضى الله عنهما - أَنَّصلى الله عليه وسلم قَالَ لَهُ أَوْ قَالَ لِرَجُلٍ وَهُوَ يَسْمَعُ ‏"‏ يَا فُلاَنُ أَصُمْتَ مِنْ سُرَّةِ هَذَا الشَّهْرِ ‏"‏ ‏.‏ قَالَ لاَ ‏.‏ قَالَ ‏"‏ فَإِذَا أَفْطَرْتَ فَصُمْ يَوْمَيْنِ ‏"‏ ‏.‏

sunnah.com