J
J
jtag2017-09-28 13:22:05
MySQL
jtag, 2017-09-28 13:22:05

How can I get the rows in which the date is in the interval of the past hour?

How can I get the rows in which the date is within an hour? This format: 2017-09-06 07:27:08.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2017-09-28
@msa6886

SELECT *
FROM foo
WHERE date BETWEEN DATE_SUB(NOW(), INTERVAL 1 HOUR) AND NOW()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question