Use DATE_FORMAT() in your query, or UNIX_TIMESTAMP() to pull it out as a
unix timestamp and use date() in PHP to format it.

Chapter 6, Date and Time Functions in the MySQL Manual has the syntax for
each of the MySQL functions.

---John Holmes...

----- Original Message -----
From: "Clint Tredway" <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 12:55 PM
Subject: [PHP] Date Formatting

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.


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to