note 81875 deleted from function.date by danbrown
| From: | danbrown@php.net | Date: | Sun, 20 Jul 2008 02:45:56 +0000 |
| Subject: | note 81875 deleted from function.date by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-141984@lists.php.net to get a copy of this message | ||
Note Submitter: Dave Schlaegel
----
Here is an easy MySQL way of getting the difference in dates. For me it is more logical to do this
on the select than running it though an additional PHP function after selecting the date. But
depends on what your doing of course. I hope it helps.
SELECT ABS(DATEDIFF(NOW(),yourdateField)) as dateDiff