Question: can when be a preposition?
Answer: Depends on what grammatical sect you belong to. In traditional grammar when is a subordinating conjunction; in the Cambridge Grammar of the English Language it's a preposition. In neither case is a comma required. ... And the hyphens are neither required nor desirable.