While Joseph was in prison, both the king's personal servant and his chief cook made the king angry. So he had them thrown into the same prison with Joseph.
“We each had a dream last night,” they answered, “and there is no one to tell us what they mean.” Joseph replied, “Doesn't God know the meaning of dreams? Now tell me what you dreamed.”
However, you must realize that these mysteries weren't explained to me because I am cleverer than everyone else. Instead, it was done so that you would understand what you have seen.
He also changed the man's name from Daniel to Belteshazzar. Not only is he wise and intelligent, but he can explain dreams and riddles and solve difficult problems. Send for Daniel, and he will tell you what the writing means.