The Danish state pension can be paid to people who have reached the retirement age, which is today 65.5 years. The retirement age is gradually increased to 67 years in the period 2019-2022.
Normally you have to be a Danish citizen, residing in Denmark to receive pension, but the requirement of citizenship and residence is waived for workers, self-employed persons and students who are nationals of an EU, EEA or Switzerland.These persons can receive the pension in another EU or EEA country as well as Switzerland on the same terms as if they lived in Denmark.
Normally you will have the right to full state pension if you have 40 years of permanent residence in the danish kingdom between you are 15 years old and your retirement age. If you have not lived in Denmark, the Faroe Islands or Greenland for 40 years, you will only receive a share of a full Danish pension, corresponding to the proportion of the 40 years that you have lived in the kingdom.
Reed more here: https://lifeindenmark.borger.dk/pension