Results 1 to 4 of 4
Thread: Time Stamp - Between
Jan 22, 2013, 17:31 #1
- Join Date
- Mar 2011
- Manchester, UK
- 0 Post(s)
- 0 Thread(s)
Time Stamp - Between
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.
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
SELECT * FROM `leads` WHERE `ProgramID` LIKE '1' AND `TimeStamp` BETWEEN '%2013-01-22%' AND '%2013-01-22%' ORDER BY `leads`.`LeadID` DESC
Thank you.You're Help Does Not Go Unnoticed, I have So Far Donated £25 GBP
To Cancer Research UK As A Thank You To All The SitePoint
Members That Have Helped Me In The PHP Forum Thank You!