Use this:
function makedate($format, $indate)
{
$temp = explode("-", $indate);
$fulldate = mktime(0, 0, 0, $temp[1], $temp[2], $temp[0]);
$temp = date($format, $fulldate);
return ($temp);
}
and call it with this:
makedate("F d, Y", $row->datefield);
where $row->datefield is the variable of the date field in your table.
Peter
At 11:55 AM 12/13/2002 -0600, you wrote:
How can I format a date coming out of a MySQL? I know how to format
today's date but not a date coming out of MySQL. I have looked through the
manual, but I must be blind because I cannot figure it out.
Thanks,
Clint
- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php