I have a table called Productsinside this table. I have three entries:
ID | Price | Date
1 20.0 2018-04-03 18:30:00
2 30.00 2018-04-03 18:30:00
3 30.00 2018-04-04 18:30:00
I want to return all records that have an Dateinterval between 2018-04-01(start date) and 2018-04-03(end date). The end result will be (id): 1,2.
My request has this syntax:
SELECT * FROM Products WHERE datetime BETWEEN '2018-04-03' AND '2018-04-03'
When I execute it inside the utility DB Browser for Slite, I get this message:
0 rows returned in 0ms from: SELECT * FROM Products WHERE datetime BETWEEN '2018-04-03' AND '2018-04-03'
But if I edit the request in:
SELECT * FROM Products WHERE datetime BETWEEN '2018-04-03' AND '2018-04-04'
I get the correct recording identifiers: 2, 3.
Is this a mistake, or did I do something wrong?
source
share