This is a similar verse in that it is a way of making a point.
Gen 3:9-11
9 And the LORD God called unto Adam, and said unto him, Where art thou?
10 And he said, I heard thy voice in the garden, and I was afraid, because I was naked; and I hid myself.
11 And he said, Who told thee that thou wast naked? Hast thou eaten of the tree, whereof I commanded thee that thou shouldest not eat?
(KJV)
Now God knew all this before hand and was just wanting them to say it themselves.
Jesus did have at least one thing that he did not know.
Mark 13:32
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.
(KJV)
While Jesus was on earth he set aside some of his attributes. He limited himself in certain ways. He got hungry, tierd, thirsty, etc. He made himself an example of what we should be, in that he was obedient to the Father and served the Father, etc.
Jesus's self limitations in no wise diminishes his divinity. It shows his love for us in that he condesended to become a man for our benifit.
Phil 2:6-11
6 Who, being in the form of God, thought it not robbery to be equal with God:
7 But made himself of no reputation, and took upon him the form of a servant, and was made in the likeness of men:
8 And being found in fashion as a man, he humbled himself, and became obedient unto death, even the death of the cross.
9 Wherefore God also hath highly exalted him, and given him a name which is above every name:
10 That at the name of Jesus every knee should bow, of things in heaven, and things in earth, and things under the earth;
11 And that every tongue should confess that Jesus Christ is Lord, to the glory of God the Father.
(KJV)