# What is the difference between exercise and expiry date?

I know in American options you can exercise the options at any time before expiry date but in European options you can only exercise the options on expiry day.

On National Stock Exchange of India the options traded are European types but I have closed my option position before expiry. So I am confused between expiry date and exercise date.

Can anyone tell the difference between these two with simple example?

Exercising an option on some date $$t$$ means that you receive the payoff of the option $$G_t$$ on that date. For example, if a call option is exercised you'd get $$(S_t - K)^+$$ if you exercise on date $$t$$.