Both can fit the semi-dressy code but I think D&G PH would be better, and it lasts longer on the skin. The only down side is that I think it's a little too popular but I think Black Code's up there as well.
I actually consider D&G PH more versatile than Black Code. I can wear D&G during the day with jeans/t-shirt and then reapply later on for a formal dinner party. On the other hand, Black Code strikes me more as an evening scent.
D&G can be confusing... it smells different on different skins than your average perfume does. Another good example of this would be Angel for women... which ranges from a honey desert to bad BO. Do you own any semi-dressy scents? When I think semi-dressy, I think of HM, Vetiver, and Allure as posibillities.
I really dont own any semi-dressy scents, Gravity would prob be the closest thing, but i've worn D&G before and it had a dressy effect to it and i've worn Black Code before as well but since i own Brit i'm not sure if i wanna stick to getting Black Code, i have a limited collection and tryin to set it up to be versatile while being able to "dress" for all occassions
Personally i'd go with (Black) Code for semi-dressy for sure. D&G is good too, but to me D&G is less dressy and can go more casual (but can also be pretty at home dressy too). When i'm semi-dressed up i actually probably use (Black) Code the most of any of my fragrances.