Sunan an-Nasa'i, Volume 3, Book 22, Hadith 2202 (DarusSalam) ⓘ
It was narrated from Abu Hurairah that the Messenger of Allah said: "Whoever spends the nights of Ramadan n prayer (Qiyam) out of faith and in the hope of reward, he will be forgiven his previous sins." '
أَخْبَرَنَا مُحَمَّدُ بْنُ سَلَمَةَ، قَالَ حَدَّثَنَا ابْنُ الْقَاسِمِ، عَنْ مَالِكٍ، قَالَ حَدَّثَنِي ابْنُ شِهَابٍ، عَنْ حُمَيْدِ بْنِ عَبْدِ الرَّحْمَنِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " مَنْ قَامَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ " .
also referenced under: Hadith 2200 (Reference) & Book 22, Hadith 111 (In-Book)