Yes, you would think that P&O would be able to advise of the formal nights in advance, but as already said, where possible they tend to be on sea days.
I assume that you're looking to book speciality restaurants for non-formal nights as the dress code applies to these as well as the MDR except with the Limelight Club on Britannia.
The dress codes will be available once you are on board and we've never had any problems booking restaurants then.
Have a great holiday.