RE: [PHP] date() formatting
| From: | Boget, Chris | Date: | Wed, 23 Aug 2000 20:33:43 +0000 |
| Subject: | RE: [PHP] date() formatting | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-13210@lists.php.net to get a copy of this message | ||
> I have a field of type datetime. I would like to format the
> record so that it displays for example, 'Wed, August 23,
> 2000 12:40:33' I already tried doing date("D M d, Y H:i:s",
> $rs["date"]) but I keep getting Jan 01, 1970 00:33:20 date.
> There is no problem with pulling the record as it displays
> the MMMM-YY-DD HH:II:SS format. Is there anything I am
> missing or doing wrong? Thanks.
date() takes a unix timestamp as it's second parameter. Unless
I'm missing something, $rs["date"] isn't a unix timestamp but
some other data type.
Chris