Log in

View Full Version : Resolved Selecting a date interval from DB



bautistajuan071
06-22-2015, 09:16 PM
Hello Everyone,

What is wrong with this query ? :(
Is only selecting June 17 to June 18.


SELECT myID, myDate, topic FROM myTable WHERE myDate >= '2015-06-17' AND myDate <= '2015-06-19';

Any help will be greatly appreciated, and thank you in advance

bautistajuan071
06-23-2015, 06:08 PM
Huh!! I got it, and post the answer in case some one run into the same issue :)


SELECT myID, myDate, topic FROM myTable WHERE DATE(`myDate`) BETWEEN '2015-06-17' AND '2015-06-19';

james438
09-03-2015, 03:59 AM
Closed since the thread is resolved and it has been attracting a lot of spam.

I took the liberty of editing the first post to mark it as resolved.