The article "le" is needed because it is necessary to determine which months you are talking about; as preceding your phrase there must be an introduction of those two month, "le" stipulates they are the months you are talking about; "le" is here used in its determinative function.
- They'll have to participate to a two month training stage in a foreign land and so for not one day of both months will they be able to be home, is that clear?
Il devront participer à un stage de formation de deux mois dans un pays étranger et donc il n'y aura pas un seul jour des deux mois où il puissent être chez eux, est-ce que c'est compris ?
There is no article in English because it is already present in the word "both"; "both" is a determiner defined as meaning "the two ".
In a different context, you do not use the article.
- Every day of two months in the year they spent at a sea resort, I think it must be July and August.
Tous les jours de deux mois dans l'année il sont dans une station balnéaire, je crois qu'il s'agit de juillet et aout.
There is no specification of the months before the utterance, they do not belong to the context, and thus no determiner is needed and plain "de" is enough.
You must realise that numbers are considered as adjectives in French ("deux" is a "adjectif numéral cardinal", "deuxième" is a "adjectif numéral ordinal"), never as articles (in one of your sentences : "'deux' can work as an article").