Regarding ex dividend date

Vishwanath Pattanshetty (31 Points)

01 June 2021  
at what date should I buy shares and sell it so that I can get dividend when the company announces it???