Daniel 2:15-21
Daniel 2:15
He answered and said to Arioch the king's captain, Why is the decree so hasty from the king? Then Arioch made the thing known to Daniel.
Daniel wanted to know why the decree to destroy all the wise men in Babylon was so hasty or so urgent.  The name Arioch means Lion-like or servant of the moon god.  Apparently, like a lion, Arioch was able to be pacified.  He was probably a reasonable man with a decree that he probably did not want to fulfill.  So what he did was he made the matter known to Daniel along with the whole situation concerning the dream and the inability of the King’s counselors to tell the dream and interpret it.
Daniel 2:16
Then Daniel went in, and desired of the king that he would give him time, and that he would shew the king the interpretation.
Here we have a very volatile situation.  Daniel had gone into the King and requested a short time and then he would give him the interpretation of the dream.  Daniel could not have walked into the King’s court by himself because he was unknown at the time so it was probably Arioch who introduced him to the King.  Arioch took a big chance that he would not be slain because the King issued a very urgent decree to destroy all the wise men in Babylon and Arioch was not completing that task at this time.  In other words, he was procrastinating in his duty to fulfill that order.
Daniel 2:17
Then Daniel went to his house, and made the thing known to Hananiah, Mishael, and Azariah, his companions:
So Daniel departed from the King and he immediately went to his house and made the entire situation know to his companions.  Daniel’s house may have been connected to the King’s palace or very close to it and that is why this did not take that long.
Daniel 2:18
That they would desire mercies of the God of heaven concerning this secret; that Daniel and his fellows should not perish with the rest of the wise men of Babylon.
Daniel knew that what the King wanted would have been impossible for any human to be able to divulge.  So the reason that he wanted the King to give him time was to bring it to his friends and have them join him in prayer.  Daniel knew that the God he served would be able to give him the details of the dream and also the interpretation of that dream.  They sought God’s mercy in this so that they would not perish along with all the other wise men in Babylon.  They went into some serious and intense prayer seeking God for the answer.  Just like Joseph, Daniel knew that God would give him the answer. 
Genesis 41:15-16 (KJV)   And Pharaoh said unto Joseph, I have dreamed a dream, and there is none that can interpret it: and I have heard say of thee, that thou canst understand a dream to interpret it.  {16} And Joseph answered Pharaoh, saying, It is not in me: God shall give Pharaoh an answer of peace.
Daniel 2:19
Then was the secret revealed unto Daniel in a night vision. Then Daniel blessed the God of heaven.
Then God answered Daniel’s prayer by giving him an answer to the King’s request.  It came in the form of either a dream or a special vision but no matter how it came Daniel now knew what the dream was and he was ready to make it known unto the King.  Daniel then gave thanks to the God of Heaven for answering his prayer which meant that the slaughter of all the wise men would now be stopped.
Daniel 2:20
Daniel answered and said, Blessed be the name of God for ever and ever: for wisdom and might are his:
Daniel then praises God by desiring to see His name blessed for ever and ever.  There was no way even Daniel could have known the dream but it was God who gave him the details and meaning.  Daniel praises God by stating that wisdom is His.  That is, that God is the ultimate source of wisdom.  James 1:5 (KJV)   If any of you lack wisdom, let him ask of God, that giveth to all men liberally, and upbraideth not; and it shall be given him.  Then Daniel states that might also belongs to the Lord.  Psalm 145:6 (KJV)   And men shall speak of the might of thy terrible acts: and I will declare thy greatness.
Daniel 2:21
And he changeth the times and the seasons: he removeth kings, and setteth up kings: he giveth wisdom unto the wise, and knowledge to them that know understanding:
Here Daniel is also praying according to what God had shown him in the dream.  God changes the times and seasons, not only meaning that he changes the four seasons of the year but also He creates adversity in one area and prosperity in another area.  He sets up kings and removes them meaning that all the sovereigns of the earth are in the hands of the Lord.  As we look back in history, we see how earthly kingdoms have come and gone.  This would also be in accord to what was just revealed to Daniel and Nebuchadnezzar in the dream.  How all earthly kingdoms including future kingdoms will come and go.  Then Daniel praises God for giving wisdom to the wise, making them wiser.  Then those who know understanding, that is, those that have good discernment, God will increase in understanding and discernment.  Proverbs 2:6 (KJV)   For the LORD giveth wisdom: out of his mouth cometh knowledge and understanding.