Elder Neal A. Maxwell testified that there is no limit to God’s knowledge:
“Some have sincere faith in the existence of a God but not necessarily in a revealing and omniscient God. Other sincere individuals question God’s omniscience, wondering, even though respectfully, whether even God can know the future. But an omniscient and revealing God can at any present moment disclose things future. This is possible because ‘in the presence of God, … all things for their glory are manifest, past, present, and future, and are continually before the Lord’ (D&C 130:7). Thus God ‘knoweth all things, for all things are present before [his] eyes’ (D&C 38:2). He told Moses, ‘There is no God beside me, and all things are present with me, for I know them all’ (Moses 1:6).
“No qualifiers on the scope of God’s knowledge appear in holy writ. Instead, we read: ‘O how great the holiness of our God! For he knoweth all things, and there is not anything save he knows it.’ (2 Nephi 9:20.)” (If Thou Endure It Well [1996], 46).