Let me assure you that DATETIME is the worst choice ever... because it need 8 bytes per record... TIMESTAMP uses only 4 DATE uses only 3, so does TIME YEAR is the smallest... 1 byte.
You can do: SELECT * FROM activities WHERE act_date >= NOW() But for optimization... you should not compute in WHERE... so this is faster.. .but there are 2 queries: SET @this_moment = NOW(); SELECT * FROM activities WHERE act_date >= @this_moment Gabriel PREDA www.amr.ro ----- Original Message ----- From: Reinhart Viane To: mysql@lists.mysql.com Sent: Friday, February 18, 2005 1:10 PM Subject: compare dates Hey list I need a query like this: Select * from activities where act_date = today or any day in the future I have made it work like this: Sselect * from activities where UNIX_TIMESTAMP()< UNIX_TIMESTAMP(act_date) Problem is with this thing I have to manually add 23:59:59 to each activity date I enter in the database. I'm sure there is a better way so I can set my column type to DATE instead of DATETIME now and use a better query. Any help? Thx Reinhart