Hope you have a great day in Spanish. Almost every response suggests a direct translation into Spanish. The truth is that this is a uniquely American expression; no one says anything similar in a Spanish-speaking or European country (and I have traveled a lot). In the United States, you could hear someone say, “have a good day,” but it sounds false and strange. Anglicism is a term or expression that has been directly translated from English into another language without taking into account the idioms and traditions of the other language.
I’ve also heard “Que lo passe bien” or “Que lo pases bonito,” both of which are far superior to “Que tengas un buen da.”
“Have a nice day,” I assume, is a greeting spoken between strangers or casual acquaintances. To say goodbye to a stranger or acquaintance, a Spanish speaker can use a variety of expressions:
Until next time!
I hope everything works out. (Probably the closest analogy)
Wishing someone a pleasant day is not part of the culture.
In English, the expressions always strike me as a little arrogant. Who are you to wish me a pleasant day? Take another swig! Have some candy! Have a wonderful day! It just sounds strange.