"It happened when I hurt myself on the bottle."
Translation:Det skete da jeg slog mig på flasken.
At skade and slog, have the same meaning. "Skade" means hurt and "slå" means hit, I think the sentence can be misleading to people learning danish. I am saying this because I am danish myself and took the test for fun. I have found mistakes like this and others in the test, just saying.
There are different words for "when", depending on their usage in Danish.
If it is a question and you are using "when", "hvornår" is the correct Danish word to use.
If you are using when as a modifier (x happened/happens when y happened/happens), there are two options: If it is in the present tenses, you use "når"; if it is in the past tense, you use "da". They are not interchangable. We can say Danish is more specific that way compared to English.
Hope this helps, I am not a native speaker and these are the only "when" translations I know (there may be more).