how to query a column with date in sql code example
Example 1: create table with date column in sql
mysql> create table DemoTable
(
StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
StudentName varchar(20),
StudentAdmissionDate DATE
);
Query OK, 0 rows affected (0.47 sec)
Example 2: how to search date in sql query
select * from test
where date between '03/19/2014' and '03/19/2014 23:59:59'
Example 3: how to search date in sql query
select * from test
where datediff(day, date, '03/19/2014') = 0