Click here to Skip to main content
15,884,739 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Get records between date for example in mysql


2009-08-11 to current date

2009-08-11 is to retrieve all date , this is just an example

I have tried WHERE time between date(time) and DATE(time) = CURDATE();
Posted
Updated 16-Nov-14 2:07am
v2

http://msdn.microsoft.com/en-us/library/ms187922.aspx[^]
Sample (D.) talks about dates specifically, but you should read all...
 
Share this answer
 
try with
SQL
set @input_date= '2009-08-11 00:00:00';
SELECT  *
  FROM TableName 
   WHERE dateTimeColumnName BETWEEN DATE(@input_date) AND CURDATE();
 
Share this answer
 

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