When have you had residence in Denmark for at least 5 years?
When the Department of Civil Affairs assesses whether you have had residence in Denmark for at least 5 years, they use information from the Central Personal Register (CPR).
It is not a requirement that you have had residence in Denmark for 5 consecutive years. It also does not matter how long it has been since you lived in Denmark or how old you were when you lived in Denmark.