Converting primary residence to rental

How do we add a current property that has been a primary residence for 2 years and will become a rental property next month? Do I have to account for closing costs, fees that I paid for 2 yrs ago? How do I prorate expenses for the partial year (6months primary residence, 6months rental)? Thank you