Re: Using date() function

From: Date: Sun, 06 Oct 2002 11:59:19 +0000
Subject: Re: Using date() function
References: 1  Groups: php.general php.windows 
Request: Send a blank email to php-general+get-118989@lists.php.net to get a copy of this message
First you should use : $entry_date = date('l, d F Y H:i:s',$sql['date']); And $sql['date'] must be a TIMESTAMP. -- Nicos - CHAILLAN Nicolas nicos@php.net www.WorldAKT.com - Hébergement de sites Internet "Davy Obdam" <info@davyobdam.com> a écrit dans le message de news: 001601c26d2c$e5391ff0$9600000a@davy... > Hi people > > I have a guestbook, and i need to convert the date and time from the > database into a normal readable date.. Like Sunday, 6 october 2002 > 13:30:00. I thought i could use the date() function here. I have done > this: > > $entry_date = date('l, d F Y H:i:s','$sql["date"]'); > echo $entry_date; > > But then i dont get the date i need. It says Thursday, 01 January 1970 > 01:00:00 (i wasnt even born then;-), so it wasnt me signing > that > guestbook. Any sugestions what i am doing wrong. Thanks for your time. > > Best regards, > > Davy Obdam, > mailto:info@davyobdam.com > >

« previous php.general (#118989) next »