Newby: DATE Question
| From: | Doug Coning | Date: | Thu, 24 Oct 2002 15:54:03 +0000 |
| Subject: | Newby: DATE Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-121297@lists.php.net to get a copy of this message | ||
Hi everyone,
Sorry for this basic question, but I can't seem to get the code to work.
In my MySQL database I have a column that is a TIMESTAMP to automatically
stamp the date when created. However, I can't get it to pull correctly into
my php result.
Here is a sample of one record that has the value of 20021024083050 in the
date column.
In my php code I have the following pieces of coding (there's more than
this, but this is what's returning the date).
$query = "SELECT * FROM posting ORDER BY date DESC";
$date = strftime("%d/%m/%y", $thread['date']);
And this is the result I receive: Result: 18/01/38
PLEASE help. I have changed the code and can't get it to work.
Thank you!!!!!
Doug Coning