Extent of either time or space (how long, how far) is expressed by the accusative:
Graeci Troiam decem annos obsidebant. The Greeks were beseiging Troy for ten years.
fossas quindecim pedes latas fodere iussi sumus. We were ordered to dig ditches fifteen feet wide.
Both time when or time within which are expressed by the ablative:
nuntius quarto die advenit. The messenger arrived on the fourth day.
amici nostri paucis horis redibunt. Our friends will return in a few hours.
*Time how long…