formatting time from 24 hours to 12 hours