Answer by Japanese teacher
“Yoi ichi nichi o” is the short form of “良(よ)い一日(いちにち)をお過(す)ごしください yoi ichi nichi o osugoshi kudasai” and is more often used in writing. Actually the Japanese do not say this phrase often. “Have a good day” or “I hope you have a great day” are often used in Western countries where people speak English but the Japanese do not have a custom of saying the equivalent.
Between friends, the Japanese usually say “じゃ、また ja, mata” (see you again) or “またあした mata ashita” (see you tomorrow). If it is in a business context, people usually say “失礼(しつれい)します shitsureeshimasu” (I’ll take my leave) or “お先(さき)に失礼(しつれい)します osakini shitsureeshimasu” (I’ll take my leave first)
On the other hand, recently, newscasters in Japan are starting to say “yoi ichi nichi o osugoshi kudasai” at the end of their programme. Perhaps this is a cross cultural influence that is slowly changing the way language is used and this phrase will become more common in the future.