a datetime column is, as you say, formatted yyyy-mm-dd hh:mm:ss. You can use PHPs date() function to format it as you want. E.g.:
Code: Select all
echo date('jS F Y', strtotime($sqldate));
which will output something like '19th November 2009'.
Have a look at php's date manual (
http://php.net/manual/en/function.date.php) for a full list of format strings
edit: updated code which was horrifically wrong lol :/ should now work
edit2: to include GMT, as you know your time is already being stored in GMT, simply output the string GMT yourself, e.g.
Code: Select all
echo date('H:i:s') . ' GMT on ' . date('jS F Y', strtotime($sqldate));
which should output something like '14:15:01 GMT on 19th November 2009'
hth