Saying have a good day is more common than have a good afternoon. That's what I would say. However, both are possible. It's more common to just say good afternoon or good evening. And if it's the end of the night, then just goodnight or good night, and that can be one word or two words. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.