When did god create the devil?

Why did god create the devil? Bible versus please.
15 answers 15