Page 1 of 1

A little SQL problemo

Posted: Tue Nov 01, 2005 7:15 am
by Ree
SELECT stamp FROM timecheck WHERE NOW() - 20 MINUTES > stamp.

I need to select all times (stamp field is TIMESTAMP) which are more than 20 minutes earlier than current time. I get MySQL syntax error. What is the problem?

Posted: Tue Nov 01, 2005 8:17 am
by feyd
DATE_SUB() or do the math for it via conversion to UNIX timestamp of the parts..