You should read the docs for strftime
and strtotime
An example of converting UNIX timestamp to your format:
$time = time(); // UNIX timestamp for current time
echo strftime("%A, %l:%M %P"); // "Thursday, 12:41 pm"
To get a MySQL datetime value, assuming it comes out of the database as "2010-07-15 12:42:34", try this:
$time = "2010-07-15 12:42:34";
echo strftime("%A, %l:%M %P"); // "Thursday, 12:42 pm"
Now, in order to print the word "today" instead of the day name you will have to do some additional logic to check if the date is today:
$time = "2010-07-15 12:42:34";
$today = strftime("%Y-%m-%d");
// compare if $time strftime's to the same date as $today
if(strftime("%Y-%m-%d", $time) == $today) {
echo strftime("Today, %l:%M %P", $time);
} else {
echo strftime("%A, %l:%M %P", $time);
}