It is quite easy. Assuming you have a field(dateposted) with the type "timestamp" in your database table already queried and you want to display it, have it formated and also have the AM/PM, all you need do is shown below.
Note: Your OUTPUT should look some what like this depending on the date posted
May 21, 2014 03:05:27 PM