Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:29:14

And We certainly sent Noah to his people, and he remained among them a thousand years minus fifty years, and the flood seized them while they were wrongdoers.  

And verily We sent Noah to his people, when he was forty years of age or older, and he remained among them a thousand-less-fifty years, calling them to affirm God’s Oneness, but they denied him; so the Flood engulfed them, a deluge of water drifted against them, rising above them and drowning them, for they were wrongdoers, idolaters.
القرآن:٢٩:١٤

وَلَقَدْ أَرْسَلْنَا نُوحًا إِلَىٰ قَوْمِهِ فَلَبِثَ فِيهِمْ أَلْفَ سَنَةٍ إِلَّا خَمْسِينَ عَامًا فَأَخَذَهُمُ الطُّوفَانُ وَهُمْ ظَالِمُونَ  

{ولقد أرسلنا نوحاً إلى قومه} وعمره أربعون سنة أو أكثر {فلبس فيهم ألف سنة إلا خمسين عاماً} يدعوهم إلى توحيد الله فكذبوه {فأخذهم الطوفان} أي الماء الكثير طاف بهم وعلاهم فغرقوا {وهم ظالمون} مشركون.