MySQL Forums
Forum List  »  Newbie

use of datediff and/or timediff
Posted by: R L
Date: August 26, 2004 10:17PM

Hello All,
I'm in the process of converting my MS SQL statements to MySQL 4.1.3 beta and I've come up against a little problem.

I have a query that queries a members table to get a count of members that have logged in in the last 15 minutes. My current query is below...

select count( memberid )
from members
where datediff( n ,l astlogin, now() ) < 15

How can I do this or something similar with mySQL??

I've looked at the datediff and timediff functions, but can't figure out how to use them in a similar fashion.

Thanks in advance!

Options: ReplyQuote

Written By
use of datediff and/or timediff
August 26, 2004 10:17PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.