Re: Comparing two dates.. Which is the older one?
| From: | Phillip Bow | Date: | Wed, 21 Mar 2001 00:12:45 +0000 |
| Subject: | Re: Comparing two dates.. Which is the older one? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-44852@lists.php.net to get a copy of this message | ||
If I were doing this for simplicity's sake I would alter this to be:
$timestamp = mktime();
$date_output = date("Y-m-d H:i A", $timestamp);
Then store the $timestamp in the (pseudo)database. Any operations I need to
compare times will be done on the $timestamp data rather than the
$date_output data which contains a bunch of string data that would otherwise
have to be compensated for with more code.
--
phill