When the king heard this, he was greatly distressed; he was determined to rescue Daniel and made every effort until sundown to save him. (NIV)
Then the king, when he heard these words, was much distressed [over what he had done] and set his mind on Daniel to deliver him; and he labored until the sun went down to rescue him. (AMP)
Then the king, when he heard these words, was sore displeased with himself, and set his heart on Daniel to deliver him: and he laboured till the going down of the sun to deliver him. (KJV)