Original: After his election to the presidency, Ahmadinejad's resignation as the mayor of Tehran was accepted on 28 June 2005.
Simplified: He was chosen to be the president in elections on June 24, 2005.