Click here to Skip to main content
15,038,875 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
We want filter data between two dates. when we execute query then it return outer range of data to selected dates.
Posted
Updated 23-May-16 22:09pm
Comments
Member 14804953 16-May-21 2:24am
   
I have one question,that I want to filter/search records with drop-down lists,and timeStamp from three tables,how to do that

SQL
Select * from tables where CREATE_TIME > "2008-02-01" and CREATE_TIME < "2008-02-08"


Please try this one.
   
v2
Comments
Krishna BSPL 18-Dec-14 4:57am
   
thanks

but i m using
SELECT * FROM `crm_users` WHERE contract_end_date BETWEEN ".$start." AND ".$to."
query for this.
$start and $to is run time variables.
this is not working
Something like
SQL
SELECT *
FROM `table`
WHERE `table_date` BETWEEN CAST('2014-12-20' AS DATE) AND CAST('2014-12-25' AS DATE);


Here's some links for Reference:
MySQL BETWEEN comparison [^]
MySQL CAST as [^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900