MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Scott Haneda Date:May 26 2003 12:38am
Subject:Select * where timestamp older than x days
View as plain text  
I have a timestamp(14) field called added, I need to select where that field
is older than x days.

I think 
WHERE added < DATE_SUB(NOW(),INTERVAL 7 DAY) may work, but I am not sure, as
I also suspect this wants a datetime format, not timestamp(14)

Scott Haneda                                Tel: 415.898.2602                       Fax: 313.557.5052
scott@stripped                            Novato, CA U.S.A.

Copying Data Files vs. ReplicationBiju Chacko25 May
  • Select * where timestamp older than x daysScott Haneda26 May
    • Re: Select * where timestamp older than x dayscolbey26 May