Re: date() formatting

From: Date: Wed, 23 Aug 2000 20:30:47 +0000
Subject: Re: date() formatting
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-13235@lists.php.net to get a copy of this message
On Wed, 23 Aug 2000, O.J. Alcaraz wrote: > 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. Is $rs[date] a Unix timestamp? That's what date() is looking for in the second argument. The first argument is formatted fine. <? echo date("D M d, Y H:i:s",mktime()) ?> yields Wed Aug 23, 2000 13:31:06 Matt

« previous php.general (#13235) next »