Remember how Joseph had been imprisoned and during that time, 2 men told him their dreams? He listened to their dreams and gave each of them an interpretation. The interpretations came true once they both were released from prison. But how did Joseph do this? The dreams of these two men were not obvious, so how did he know that one of the dreams meant that the man would be hanged and the other would be reinstated?
As a Christian, I believe we are able to receive the direction of the Holy Spirit and therefore we can know whatever the Spirit knows. I believe that, even though Jesus had not died on a cross yet, He can be found in the past, present and the future. Therefore, Joseph was able to access the Spirit BEFORE Jesus sent Him to those who accept(ed) Jesus as their savior.
The Bible says we need only ASK to RECEIVE; KNOCK and the door with Open; SEEK and we will FIND. So apparently Joseph did all three above and God answered his questions. Because of these answers, Joseph was freed and became the second greatest ruler in Egypt. Not only that, but he fed and saved his family who would have starved during his reign.
Do you have a pressing question? Ask, Knock and Seek for the answers from God. He will show you what you need to know.