Bottom line: Our approach to God in prayer is not based on our righteousnesses, but rather it is based on God's mercies.
Daniel gives us a beautiful model for prayer. We see his motivation, preparation, confession, supplication, and reception. We also learn two big lessons from Daniel's prayer: 1) pray bold prayers, and 2) never underestimate God's mercy.