Re: how to convert a string into a date format ?????

From: Date: Wed, 10 Oct 2001 05:04:33 +0000
Subject: Re: how to convert a string into a date format ?????
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-70582@lists.php.net to get a copy of this message
list($year, $month, $day) = explode('-', '2001-10-25'); echo $year; echo $month; echo $day; OR $aData = explode('-', '2001-10-25'); echo $aData[0]; //year echo $aData[1]; //month echo $aData[2]; //day -Jason Garber IonZoft.com At 10:36 AM 10/10/2001 +0530, sagar N Chand wrote:
hi all, i have a string like this "2001-10-25". I want to convert this into a date format. ie i want to get only the month or only the date or only the year from this string without using string manupulations. is there any way out. i've gone thru the manual. /sagar


« previous php.general (#70582) next »