A polite greeting need not be formal
In Denmark, hej can be a perfectly courteous opening even when you are speaking to a stranger. There is no need to choose an elaborate greeting simply because someone is older or working behind a counter. Goddag is still an option for a more traditional daytime encounter. Listen to the other person and adjust your tone rather than relying on a strict formal greeting rule.
Mojn near the German border
Southern Jutland has a distinctive greeting, mojn, which is historically connected with German speech. Its function varies within the region: it can mark arrival and departure in the east, while in the west it is particularly associated with saying goodbye. If you are travelling near the border, recognising the word can help you follow an exchange without assuming that it is used throughout Denmark.
A name or a hello on the telephone
You may hear someone identify themselves by name when answering a Danish call. A questioning hallo? also works as a telephone opening, especially when you are checking whether the caller can hear you. In person, the same word can sound like an attempt to attract attention. Use hej as your default face-to-face greeting instead of transferring every English use of hello directly into Danish.