Re: Need Help on subtract Time
| From: | Russ Michell | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Need Help on subtract Time | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14348@lists.php.net to get a copy of this message | ||
Kelvin:
If you're using MySQL - go check out: http://www.mysql.com/doc/D/a/Date_and_time_functions.html
It has some great little MySQL data and time functions. I have personally found it invaluable.
Good luck! :-)
Russ
On Wed, 14 Nov 2001 15:49:03 -0500 kelvin <kelvin_y@decode-ent.com> wrote:
> Hi everyone,
>
> I have a table with those field. ---> Username, Uid, and Time.
> Ok, I tried to select data which their time is 2 min less from the
> current time or so.
>
> Could anyone help me out, How to do it?
>
> This is what I got, but doesn't work.
> ---- "select * from tablename where time <
> date("H:i:s",(time()-720))";
>
> Please help!!!
>
> Thanks.
> Kelvin
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
#-------------------------------------------------------#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic University Webteam
Room 1C 'The Eastings' East Road, Cambridge
e: r.j.michell@apu.ac.uk
w: www.apu.ac.uk/webteam
www.theruss.com
#-------------------------------------------------------#