note 60619 deleted from function.date by nlopess
| From: | nlopess@php.net | Date: | Thu, 12 Jan 2006 15:37:58 +0000 |
| Subject: | note 60619 deleted from function.date by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-101635@lists.php.net to get a copy of this message | ||
Note Submitter: mrc at interdoc dot ch
----
Note that PHP and mysql don't use the same format for the week numbers. PHP uses 2006-1,
2006-2, 2006-3, ... as MYSQL (ie. DATE_FORMAT(t_stamp,'%x-%v')) uses 2006-01, 2006-02,
2006-03, ...
To use a PHP date (generated with date('Y-W',$t_stamp)) in MYSQL you can transform it
with:
$mydate=preg_replace('
-([1-9])$','-0$1',$mydate);
Marc Reymond