Re: Date

From: Date: Wed, 20 Jun 2007 13:45:22 +0000
Subject: Re: Date
Groups: php.general 
Request: Send a blank email to php-general+get-257489@lists.php.net to get a copy of this message
Ron Piggott skrev:
How do I break $start_date into 3 variables --- 4 digit year, 2 digit month and 2 digit day? $start_year = ; $start_month = ; $start_day = ;
Of course depending on what $start_date looks like, but this should work most of the time: $timestamp = strtotime( $start_date ); $start_year = date( "Y", $timestamp ); $start_month = date( "m", $timestamp ); $start_day = date( "d", $timestamp ); /T

« previous php.general (#257489) next »