mysql> create table foo1(d date); Query OK, 0 rows affected (0.05 sec) mysql> insert into foo1 values('1969-10-04'); Query OK, 1 row affected (0.08 sec) mysql> insert into foo1 values('1979-10-04'); Query OK, 1 row affected (0.00 sec) mysql> select * from foo1; +------------+ | d | +------------+ | 1969-10-04 | | 1979-10-04 | +------------+ 2 rows in set (0.04 sec) mysql> select * from foo1 where d < '1977-01-01'; +------------+ | d | +------------+ | 1969-10-04 | +------------+ 1 row in set (0.03 sec) mysql> select * from foo1 where d > '1977-01-01'; +------------+ | d | +------------+ | 1979-10-04 | +------------+ 1 row in set (0.01 sec)