During is used to say ‘when’ something happens; for is used to say ‘how long it lasts.’
I was in London during the summer.
I was in London for six weeks.
It rained during the night for two or three hours.
We use both during and in to say that something happens inside a particular period of time.
I woke up during/in the night, with a severe headache.
We use during to stress that we are talking about the whole of the period.
The school is closed during the whole of May.
We also use during to talk about an event, activity or experience [not a period of time].
I met them during my stay in China.[correct]
I met them in my stay in China. [incorrect]
He had some strange experiences during his military service. [correct]
He had some strange experiences in his military service. [incorrect]