I am probably missing something very simple, but appreciate it if someone could point me to that.
I am doing this query on following table to fetch recs for a month: SELECT fName, lName, acctOpenDate FROM test WHERE acctOpenDate >= '2005-07-01' AND acctOpenDate <= '2005-07-31'; I expect to see all 4 rows, but I see only the latter two. The ones dated '2005-07-31' are not listed even though I am using acctOpenDate <= '2005-07-31'. fName lName acctOpenDate Ccc Cc 2005-07-30 21:08:51 Ddd Dd 2005-07-30 05:05:48 I am using "mysql Ver 12.21 Distrib 4.0.15, for mandrake-linux-gnu (i586)" DROP TABLE IF EXISTS `test`; CREATE TABLE `test` ( `fName` varchar(10) NOT NULL default '', `lName` varchar(10) NOT NULL default '', `acctOpenDate` datetime NOT NULL default '0000-00-00 00:00:00' ) TYPE=MyISAM; # Dumping data for table `test` INSERT INTO `test` (`fName`, `lName`, `acctOpenDate`) VALUES ('Aaa', 'Aa', '2005-07-31 20:56:06'); INSERT INTO `test` (`fName`, `lName`, `acctOpenDate`) VALUES ('Bbb', 'Bb', '2005-07-31 10:51:06'); INSERT INTO `test` (`fName`, `lName`, `acctOpenDate`) VALUES ('Ccc', 'Cc', '2005-07-30 21:08:51'); INSERT INTO `test` (`fName`, `lName`, `acctOpenDate`) VALUES ('Ddd', 'Dd', '2005-07-30 05:05:48'); Thanks much, Nishi -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]