MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:colbey Date:May 26 2003 12:44am
Subject:Re: Select * where timestamp older than x days
View as plain text  
Tried: where added + interval 7 day < now()   ??  Should work..


On Sun, 25 May 2003, Scott Haneda wrote:

> 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
> http://www.newgeo.com                       Fax: 313.557.5052
> scott@stripped                            Novato, CA U.S.A.
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
Thread
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