God knows everything. He is perfect in knowledge. His understanding is infinite.
1 John 3:19-20 , Job 37:16, Psalms 147:5
Psalms 33:13-15, Proverbs 15:3
God has always known everything that will ever happen.
The whole plan of the ages and each man's part in it has been known to God from all eternity.
Ephesians 1:9-12 , Isaiah 46:10