Hi,
How do i do a query where i can only get records where the timestamp is between 2 date/time ranges. I only need to do it between dates but i thought doing it with time too would be easier. But my query below is not working and keeps showing 0 results when there are rows of data between the date range. Any help would be great please.
I've also triedCode:SELECT * FROM `leads` WHERE `ProgramID` LIKE '1' AND `TimeStamp` BETWEEN '2013-01-22 00:00:00' AND '2013-01-22 23:59:99' ORDER BY `leads`.`LeadID` DESC
Any help would be much appreciated.Code:SELECT * FROM `leads` WHERE `ProgramID` LIKE '1' AND `TimeStamp` BETWEEN '%2013-01-22%' AND '%2013-01-22%' ORDER BY `leads`.`LeadID` DESC
Thank you.



Thank You!
Reply With Quote





Bookmarks