How do I do this query in MysQL? (datetime)

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-03-17T08:02:55Z Indexed on 2010/03/17 8:11 UTC
Read the original article Hit count: 112

Filed under:
|
|
|

Suppose I have a datetime column in MySQL. How do I select all that have a datetime within 2500 seconds of the current datetime?

SELECT ALL where current_datetime - that_datetime < 2500 ...

© Stack Overflow or respective owner

Related posts about mysql

Related posts about datetime