It depends on the rest of the sentence, and on the intended meaning. Consider these exanples. eg It rained twice during the three weeks of the competition.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
vickyvicky1008naturalWhen it's simply a matter of an amount of time, I invariably use "for". for two years, for three weeks, for five hours.
vickyvicky1008The "the" before "three" just doesn't sit right. Yet this "the" is nessesary because of the following specifying words.Correct. "the X of Y" is a common formula.
vickyvicky1008Doesn't this sentence sound strange to you?No.