Date formatting
| From: | Matt Davis | Date: | Fri, 06 Apr 2001 12:13:59 +0000 |
| Subject: | Date formatting | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-47431@lists.php.net to get a copy of this message | ||
Hi I am trying to format a date extracted from my DB. I have run my query
and then have used the following to get my row data
while ($row = mysql_fetch_array($sql_result)) {
$title = $row["message_title"];
$message = $row["message"];
$event = $row["date_of_event"];
$shortevent = date ("D j M", $event);
I am trying to take $event and make it diplay like this "FRI 06 APR" using
the date function. Although $event outputs like this "2001-04-06 00:00:00"
$shortevent outputs "Thu 1 Jan" which is unix epoch date.
Does anybody know what I am doiing wrong its probably something really
simple but I cant see what.
Matt.