Date calculation in a SELECT

admin

Administrator
Staff member
Hi. I have a table with a field for sign up date. What i need to do is run a report that will show me everyone who has been signed up for over a week.

literally this is the select statement

Select * from table_name where sign_up_date is eight days less than today's date
from table_name

I found this in a previous post and tried to use it but it did not work.

"SELECT * FROM $table_name
WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) <= 8

Thanks for any help you could give me
 
Back
Top