If you want to greet someone in Japanese by saying “good afternoon” or “good day,” the word you want to use is Konnichiwa.
Konnichiwa is actually a shortened version of a full greeting. Over time, a more slang version of the term evolved in the Japanese language.
“Konnichiwa” was once the beginning of a sentence that went, “konnichi wa gokiken ikaga desu ka?,” or “How are you feeling today?” (今日はご機嫌いかがですか?)
Writing Rules for Konnichiwa
There is a rule for writing hiragana “wa” and “ha.” When “wa” is used as a particle, it is written in hiragana as “ha.” “Konnichiwa” is now a fixed greeting. However, in the old days it was a part of sentence, such as “Today is ~ (Konnichi wa ~)” and “wa” functioned as a particle. That’s why it is still written in hiragana as “ha.”
The greeting can be changed to good evening, with, “Konbanwa“ where “this evening” is substituted for the word today. (今晩はご機嫌いかがですか?)