Investors & landlords

If I own a house for 10 years and then move out and it becomes a rental for 18 months do I have to pay depreciation on the house because I know that I don’t have to pay cap gains