Re: date question

From: Date: Mon, 09 Sep 2002 11:35:48 +0000
Subject: Re: date question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-115722@lists.php.net to get a copy of this message
Meltem Demirkus wrote: > Hi, > > Is there any function which returns the day , month or year of a > date ? You need two functions actually ;-)) use the date() function to generate the day, month or year from a timestamp use the strtotime() function to generate a timestamp from a date For example <? echo date( 'd', strtotime( '2002-03-26' ) ); // prints 26 ?> HTH Erwin

« previous php.general (#115722) next »