Re: timestamp problem !!

From: Date: Tue, 15 Jul 2003 18:19:03 +0000
Subject: Re: timestamp problem !!
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-155166@lists.php.net to get a copy of this message
Hi Chris.. thanks but your code generate the following error Warning: date() [function.date]: Unexpected error in ..... what's wrong? any idea ?? "Chris Boget" <chris@wild.net> wrote in message news:037401c34a43$4c460f70$8c01a8c0@ENTROPY... > > <?php > > $timy = '20030714012548'; // time stamp from MySQL > > echo strtotime = ($timy); > > $date = ("Y-m-d" , $timy); > > ?> > > You are so very close! > > <?php > $timy = '20030714012548'; // time stamp from MySQL > echo strtotime = ($timy); > $date = date("Y-m-d" , strtotime( $timy )); > ?> > > $timy isn't a unix timestamp, which is what date() is expecting. > > Chris >

« previous php.general (#155166) next »