How to end a conversion in a polite way?

Hi,

Could you tell me how to end a conversion in a polite way when you are talking to a stranger?
Someone asked me how to get to the XXX Airport which I have never been before.
instead of saying “Good bye” at the end of the conversion between we two,
I just said “Have a nice day” to her.
Is this alright to say “Have a nice day” to someone you don’t know at all?

Hi kwfine,

Yes, that’s perfectly OK. Here’s an idea:

Stranger - OK, I’ll have to go now.
You - All right, it was nice to meet you!
Stranger - Nice to meet you, too. Good bye now.
You - Bye bye. And have a nice day!
Stranger - And you.