Complex sentence: On the same day, he was sentenced to 20 weeks imprisonment but was released as he had spent longer on remand than the length of the sentence.
Split into simpler sentences: On the same day, he was sentenced to 20 weeks imprisonment. He was released that day as he had spent longer on remand than the length of the sentence.