Actually my reply above is only an example how to use SimpleDateFormat. It's not the solution to your problem. Anyway, here's the solution to your problem.
You don't need to create a Timestamp object. I mentioned the Timestamp object in my previous reply because you mentioned something about retrieving the datetime from mysql. Normally, you will get Timestamp object when retrieving the data from Timestamp.
The formatOut takes "h:mm a" not "H:mm a" if you want to format it in Hour in am/pm (1-12). Check the SimpleDateFormat API for more information.
Do let me know if you have any more questions

[ July 15, 2007: Message edited by: Freddy Wong ]