2

Hi friends I'm using MySQL. I would like to retrieve the result set by giving date in WHERE condition . I have given date range of the start date and end date . I have to compare the date[Today's] with the start date and end date .

for ex : SELECT * FROM tbl WHERE 2015-07-22 is between start date and end date .

Thanks in advance

Boneist
  • 22,910
  • 1
  • 25
  • 40
user1894647
  • 613
  • 3
  • 11
  • 22

1 Answers1

0

This will work:

SELECT * FROM tbl WHERE '2015-07-22' between start_date and end_date;

What I did:

  1. Added quotes to date
  2. removed "is" before between statement.
drunken_monkey
  • 1,760
  • 1
  • 12
  • 14