The answer to this question is more complicated than might
appear. First, Euler's formula, eix = cosx + i*sinx was known
before Euler. For example Cotes discovered that ln(cosx + isinx) =
ix. Taking natural antilogs gives Euler's formula. Cotes published
in 1714 when Euler was aged only 7.
Second, there is no record that shows that Euler simplified his
formula and derived the identity that bears his name.
Having said all that, Euler "discovered" the formula in 1740 and
published its proof in 1748.
Incidentally, I consider it to be the most beautiful formula
EVER.