RE: [PHP] date functions
| From: | Jason Murray | Date: | Wed, 06 Sep 2000 09:57:44 +0000 |
| Subject: | RE: [PHP] date functions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-15475@lists.php.net to get a copy of this message | ||
> how can I determine month and day from a given date
> formatted "M-d-Y"?
$string = "08-31-2000";
$bits = explode("-", $string);
$unixtime = mktime(0, 0, 0, $bits[0], $bits[1], $bits[2]);
$day = Date("d", $unixtime);
$month = Date("m", $unixtime);
$year = Date("Y", $unixtime);
Jason