If you purchase a home, put down 20k, sign a purchase agreement and register with the city on a land contract for 3 months

And then get a mortgage 3 months later. If you sell the home at two years and want to avoid capital gain or receive the capital gain exemption, what is considered the start of the 2 year exemption? Th