If you sell a business or investment property, you can defer tax on the gain by reinvesting the proceeds in a similar property within six months. But within 45 days you have to firm up the property you want to buy.
You have to keep the amount in an escrow account till the swap happens. Remember the tax on capital is only deferred. It is not tax-free.
If you want to learn more check out these resources: