note 54001 deleted from function.date by jacques
| From: | jacques@php.net | Date: | Mon, 20 Jun 2005 16:45:49 +0000 |
| Subject: | note 54001 deleted from function.date by jacques | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-90701@lists.php.net to get a copy of this message | ||
Note Submitter: misc at fandelem dot com
----
No one has wondered how to exercise the SQL MONTH() functionality? Anyways, here is how in PHP.
$dt can be anything STRTOTIME works on. The function is simple, but effective. Use yuor
imagination. I have a get_year and get_day function as well...
function get_month($dt)
{
return date("m",strtotime($dt));
}
k.