Format time for position and length