PDH? Do you mean PPR?
If it was PPR....
your last twelve months before sale are still eligble for consideration as your PPR, so no CGT liability arrise from you renting during this period.
If you rent for 12 months, then another 6 months for sale, it would be considered as 6 months of the entire time of ownership as eligible for CGT (18 months - 12 months = 6 months). Lots of other threads cover CGT liabilities with sample calculations.
If you rented for two years, then six months to sell, your CGT liability would be 30 months (2.5 years) - 12 months (exemption) = 18 months of total ownership time liable for CGT.
This doesn't take into account the possible SD clawback for renting within five years of buying a house exempt from SD through being an OO.
If you did mean PDH and not PPR I have no idea what the situation is as I've never come across that term before
Edit:
Principal Dwelling House (PDH) (or Principal Private Residence (PPR))
Where the property being purchased is occupied by the borrower as their principal place of residence (PPR)