Ghost
Ghost

Reputation: 149

Why is my BETWEEN clause not working?

What's wrong with this query? I followed the BETWEEN syntax found here.

SELECT * from immunochemistry
WHERE release_date BETWEEN '01-01-2015' AND '12-31-2015';

Why do I still get the 2013 and 2020 in my database?

Upvotes: 1

Views: 65

Answers (1)

Samuel O'Malley
Samuel O'Malley

Reputation: 3541

Your dates need to be in the format '2015-01-01' for MySQL. As per the documentation.

Upvotes: 2

Related Questions