RE: [PHP] Date problem

From: Date: Tue, 06 May 2003 02:22:02 +0000
Subject: RE: [PHP] Date problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146483@lists.php.net to get a copy of this message
> $file_creation_date = 2003-05-02 > echo "<strong>Created on: </strong>".date("l \\t\h\e jS \o\f > F", > $file_creation_date).'<br>'; > > prints out: > > Created on: Thursday the 1st of January > > Why is this? Because you are passing 2003 as your unix timestamp, which is what date() expects. Search google for an explanation of a unix timestamp. Also search the PHP manual for how to define a string, i.e. something with the - character in it. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.general (#146483) next »