Sunan an-Nasa'i 2202
It was narrated from Abu Hurairah that the Prophet ﷺ said:
"Whoever fasts during Ramadan" and according to the Hadith of Qutaibah, the Prophet ﷺ said: "Whoever spends the nights of Ramadan in prayer (Qiyam) out of faith and in the hope of reward, he will be forgiven his previous sins, and whoever spends the night of Lailat Al-Qadr in prayer out of faith and in the hope of reward, he will be forgiven his previous sins." '
أَخْبَرَنَا قُتَيْبَةُ، وَمُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ يَزِيدَ، قَالاَ حَدَّثَنَا سُفْيَانُ، عَنِ الزُّهْرِيِّ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ ﷺ قَالَ " مَنْ صَامَ رَمَضَانَ " . وَفِي حَدِيثِ قُتَيْبَةَ أَنَّ النَّبِيَّ ﷺ قَالَ " مَنْ قَامَ شَهْرَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ وَمَنْ قَامَ لَيْلَةَ الْقَدْرِ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ " .