Are you seriously asking this question. Very easy. God the Father and God the son know everything
Jesus did say that all His knowledge, all His Power, and the Word's that HE spoke, were given to Him by His Father.
Mark 13:
31 Heaven and earth shall pass away: but my words shall not pass away. 32 But of that day and that hour knoweth no man, no, not the angels which are in heaven, "neither the Son", but the Father. 33 "Take ye heed", watch and pray: for ye know not when the time is.
which ios why Jesus could say in Matt 7: 22-23 “Many will say to Me on that day, ‘Lord, Lord, did we not prophesy in Your name, and in Your name cast out demons, and in Your name perform many miracles?’ 23 “And then I will declare to them, ‘I never knew you; DEPART FROM ME, YOU WHO PRACTICE LAWLESSNESS.’
Well, I suppose they could argue that point with Jesus as well. "No Jesus, you aren't being honest here, you know us because you know everything." I have no reason to question HIS Words, since unless a man is given to Him for saving by His Father, the man will not be saved. It is written in the Holy Scriptures that there is a "Book of Life". It's perfectly understandable and it is biblical that Jesus would open the "Book of Life" to see whose name is written in it. If their name is not there, HE doesn't know them.
I'm OK with that.
It emphasizes that merely performing acts in His name is not enough for salvation; one must also do the will of God.
There is certainly a relationship advanced and promoted in the Holy Scriptures, between God and man for the sake of salvation. God prophesied of this in the Law and Prophets.
Duet. 18:
18 I will raise them up a Prophet from among their brethren, like unto thee, and will put "my words" in his mouth; and he shall speak unto them all that I shall command him. 19 And it shall come to pass, that whosoever will not hearken unto "my words" which he shall speak in my name, I will require it of him.
So this man, who I believe to be Jesus, has come. And HE said to repent of our transgressions of God's laws, "Live by" every Word of His Father. He said to Worship His Father in Spirit and Truth. He said to pray to His Father, not like the hypocrites do in their man-made shrines of worship, or at the local restaurant to be seen of men, but from the heart in our private moments when no one is looking but God. How can I Live By His Father's Words, worship Him and pray to Him, if I am not learned of the Father. So a man is to first "Seek the Righteousness of God", and then walk in those good works that God before ordained that His people should "walk in" (Live By) them. This man is learned of the Father, not the "other voice" in the garden.
It is written that the Will of God, is that we believe in the One He Sent, which is the Christ Jesus in my understanding. Jesus said to "Live by" every word of God. This requires a person to be learned of the Father. I can not come to Him unless I am Learned of the Father. In this way a man Glorifies God, "As God", because we believe and are harkening to the Words of the Savior HE Sent, as HE Commanded in the Law and Prophets.
In the same fashion, this same person Glorifies the Christ who God Sent, by believing on Him enough to deny ourselves and the lusts of our flesh, to become "Doers" of His Sayings, and not hearers only. In this way man can be "known of God", and given to the Lord's Christ for saving. Paul teaches to be diligent and not drawn away by this world's religious traditions that had ensnared men before they were known of God.
Gal. 4:
8 Howbeit then, when ye knew not God, ye did service unto them which by nature are no gods.
9 But now, after that ye have known God, or rather are known of God, how turn ye again to the weak and beggarly elements, whereunto ye desire again to be in bondage?
Those "Christians" in Matt. 7 may have "professed to know God", may have even quoted "some" of God's Word to justify their own righteousness and their own Lawlessness. But Jesus points out that they were not given to HIM for cleansing, they were not learned of the Father, they did not "Live by" the Word's of God, which means they didn't believe on the ONE God Sent, which means they didn't Glorify the Son, which means they didn't Glorify God "As God". Jesus points out that even though they might have created a huge religious system that calls Jesus Lord, Lord, and built schools and hospitals and sent missions around the world, "In Christ's Name", and helped random poor people all "in Christ's Name", because they didn't "Yield themselves" to God and Live By His Instruction in righteousness, He didn't know them.
As it is written about the true members of God's church.
Eph. 2:
10 For we (Those who are Learned of the Father) are his workmanship, created in Christ Jesus unto good works, "which God" (Not man) hath before ordained that we should "walk in" (Live by) them.
God the Father and God the Son both know who is and is not going to tow the line as it were.......
But we don't know, and our time on earth is limited, even Jesus didn't know when the end would come.
Mark 13:
31 Heaven and earth shall pass away: but my words shall not pass away. 32 But of that day and that hour knoweth no man, no, not the angels which are in heaven, "neither the Son", but the Father. 33 "Take ye heed", watch and pray: for ye know not when the time is.
That is why it is written, in my view, "Today, if you hear His Voice harden not your hearts".
This is why Paul teaches:
2 Cor. 5:
9 Wherefore we labour, that, whether present or absent, we may be accepted of him. 10 For we must all appear before the judgment seat of Christ; that every one may receive the things done in his body, according to that he hath done, whether it be good or bad.
This is why Peter taught:
2 Pet. 3:
10 But the day of the Lord will come as a thief in the night; in the which the heavens shall pass away with a great noise, and the elements shall melt with fervent heat, the earth also and the works that are therein shall be burned up. 11 Seeing then that all these things shall be dissolved, what manner of persons ought ye to be in all holy conversation and godliness, 12 Looking for and hasting unto the coming of the day of God, wherein the heavens being on fire shall be dissolved, and the elements shall melt with fervent heat? 13 Nevertheless we,(Those who have "Yielded themselves" to God) according to his promise, look for new heavens and a new earth, wherein dwelleth righteousness.
14 Wherefore, beloved, seeing that ye look for such things, be diligent that ye may "be found of him" in peace, without spot, and blameless.
This is the Prize of the High calling of God which was in Christ Jesus. Nothing else matters according to this same God.
Ecc. 12:
13 Let us hear the conclusion of the whole matter: Fear God, and keep his commandments: for this is the "whole duty of man".
14 For God shall bring every work into judgment, with every secret thing, whether it be good, or whether it be evil.
.