Re: time question.
| From: | Tech Support | Date: | Fri, 26 Jul 2002 16:32:41 +0000 |
| Subject: | Re: time question. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-109785@lists.php.net to get a copy of this message | ||
You can use date() and mktime() to convert, add, subtract, whatever you can
imagine, and display time in many different formats. There are some great
examples here:
http://www.php.net/manual/en/function.mktime.php
http://www.php.net/manual/en/function.date.php
Basically you want to do is convert your time(s) into Unix time and then do
your math and convert them back into whatever you want.
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
----- Original Message -----
From: "Steve Bradwell" <SteveB@compxnet.com>
To: <php-general@lists.php.net>
Sent: Friday, July 26, 2002 10:53 AM
Subject: [PHP] time question.
> Hi,
>
> How do I compare time in php?
>
> Eg. If I have a mysql time field I retrieve stored in $result[0][0] how do
I
> say :
>
> if (($result[0][0] > $result[0][0] plus ten minutes) && ($result[0][0] >
> '00:00:00')){
> .....
>
> }
>
>
> TIA
>
> -Steve.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>