had a nice time

(I) had a nice time.

 and (I) had a good time.
the standard good-bye and thank you said to a host or hostess by a departing guest. John: Thank you. I had a nice time. Sally: Don't stay away so long next time. Bye. Mary: Had a nice time. Bye. Got to run. Sue: Bye. Drive safely.
See also: nice, time