Daniel
Daniel

Reputation: 205

Get rows that is due 3 days from now

Suppose the date today is: 2019-14-01

and I have a table that is:

________________________________
id    |    name    |    due_date
1     |   test_1   |  2019-17-01
2     |   test_2   |  2019-17-01
3     |   test_3   |  2019-16-01
________________________________

how do I get all of the rows with due_date 3 days from now in mysql

Upvotes: 0

Views: 60

Answers (1)

Ass3mbler
Ass3mbler

Reputation: 3915

SELECT * FROM TABLE WHERE due_date = DATE_FORMAT(NOW() + INTERVAL 3 DAY , "%Y-%m-%d")

Upvotes: 1

Related Questions