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:20:110

Allah knows what is ˹presently˺ before them and what will be after them, but they do not encompass it in knowledge.  

He knows what is before them, of the affairs of the Hereafter, and behind them, of the affairs of this world, and they do not comprehend such ˹things˺ in knowledge: they have no knowledge of such ˹things˺.
القرآن:٢٠:١١٠

يَعْلَمُ مَا بَيْنَ أَيْدِيهِمْ وَمَا خَلْفَهُمْ وَلَا يُحِيطُونَ بِهِ عِلْمًا  

{يعلم ما بين أيديهم} من أمور الآخرة {وما خلفهم} من أمور الدنيا {ولا يحيطون به علماً} لا يعلمون ذلك.

See similar narrations below:

Collected by Qurʾān
quran:22:76

He knows what is ˹presently˺ before them and what will be after them. And to Allah will be returned ˹all˺ matters.  

He knows that which is before them and that which is behind them, in other words, what they have offered ˹in the way of deeds˺ and what they have left behind, and what they have done and what they will do next; and to God all matters are returned.
القرآن:٢٢:٧٦

يَعْلَمُ مَا بَيْنَ أَيْدِيهِمْ وَمَا خَلْفَهُمْ ۗ وَإِلَى اللَّهِ تُرْجَعُ الْأُمُورُ  

{يعلم ما بين أيديهم وما خلفهم} أي ما قدَّموا وما خلّفوا وما عملوا وما هم عاملون بعد {وإلى الله ترجع الأمور}.