PDA

View Full Version : Differences in datetime


celestine
01-26-2005, 02:48 AM
Hi

I've been reading the MySQL manual datetime function for the past 30 mins but I'm still confused.

I'm trying to select all records from a table where the postdate is later/more recent that a lastlogin time.

I tried using DATEDIFF but got a MySQL syntax error. Can someone advise me. thank you.

SELECT *
FROM table
WHERE date >''2005 -01 -25 17 :24 :47'

this query only return one row which has date = '2005-01-25 17:34:25'. I know there should be more rows returned but can't see my mistake.