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:6:59

And with Him are the keys of the unseen; none knows them except Him. And He knows what is on the land and in the sea. Not a leaf falls but that He knows it. And no grain is there within the darknesses of the earth and no moist or dry ˹thing˺ but that it is ˹written˺ in a clear record.  

And with Him, exalted be He, are the keys of the Unseen, its treasure houses, or the paths that lead to knowledge of it; none but He knows them, and these are the five things mentioned in His saying: Surely God, He has knowledge of the Hour ˹and He sends down the rain and He knows what is in the wombs. And no soul knows what it has earned for the morrow; nor does any soul know in what land it will die. Truly God is Knowing, Aware, Q. 31:34˺, as reported by al-Bukhārī. He knows what is, happening, on land, ˹in˺ the deserts, and in the waters, ˹in˺ the towns along the rivers; and not a leaf (min waraqatin: min is extra) falls, but He knows it. Not a grain in the shadows of the earth, nothing of wet or dry (˹this entire clause˺ wa-lā habbatin fī zulumāti l-ardi wa-lā ratbin wa-lā yābisin is a supplement to waraqatin, ‘a leaf’) but it is in a clear book, namely, the Preserved Tablet (al-lawh al-mahfūz). The exceptive clause ˹illā fī kitābin mubīn, ‘but it is in a clear book’˺ constitutes an inclusive substitution for the previous exceptive clause ˹illā ya‘lamuhā, ‘but He knows it’˺.
القرآن:٦:٥٩

وَعِنْدَهُ مَفَاتِحُ الْغَيْبِ لَا يَعْلَمُهَا إِلَّا هُوَ ۚ وَيَعْلَمُ مَا فِي الْبَرِّ وَالْبَحْرِ ۚ وَمَا تَسْقُطُ مِنْ وَرَقَةٍ إِلَّا يَعْلَمُهَا وَلَا حَبَّةٍ فِي ظُلُمَاتِ الْأَرْضِ وَلَا رَطْبٍ وَلَا يَابِسٍ إِلَّا فِي كِتَابٍ مُبِينٍ  

(وعنده) تعالى (مفاتح الغيب) خزائنه أو الطرق الموصلة إلى عمله (لا يعلمها إلا هو) وهي الخمسة التي في قوله (إن الله عنده علم الساعة) الآية كما رواه البخاري (ويعلم ما) يحدث (في البر) القفار (والبحر) القرى التي على الأنهار (وما تسقط من) زائدة (ورقة إلا يعلمها ولا حبة في ظلمات الأرض ولا رطب ولا يابس) عطف على ورقة (إلا في كتاب مبين) هو اللوح المحفوظ، والاستثناء بدل اشتمال من الاستثناء قبله.