Correct to say
It’s highly situational really but let me go about it in an approximate fashion. Generally, if it’s the middle of the day or late into the afternoon, you go ahead and say “I hope you are having a good day”. Else, if it’s post dusk (sunset) hours or late into the evening, “I hope you had a good day.” will be more apt.