Re: Comparing two dates.. Which is the older one?
| From: | Richard | Date: | Wed, 21 Mar 2001 00:47:15 +0000 |
| Subject: | Re: Comparing two dates.. Which is the older one? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-44854@lists.php.net to get a copy of this message | ||
Thanks..
So $date_output should only be used to print out current time, and
$timestamp is the one I should use to compare the dates?
- Richard
""Phillip Bow"" <philb@oreilly.com> wrote in message
news:998rej$16l$1@toye.p.sourceforge.net...
> 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
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>