Investors & landlords

I realize this is an old post but hoping someone has some insight on this. We closed on our house 6/30/2020 and we are selling our house 6/30/2022. We purposely did this to meet the 2 year mark to avoid capital gains tax. Will exactly two years avoid this tax or should we push closing to 7/1/2022?