Format time for position and length
Format time for position and length