List:General Discussion« Previous MessageNext Message »
From:shawn wilson Date:July 31 2011 5:59pm
Subject:Re: How select all records exact x days ago ?
View as plain text  
mysql> select day(now())-5;
+--------------+
| day(now())-5 |
+--------------+
|           26 |
+--------------+


2011/7/31 yavuz maslak <maslak@stripped>:
>
> I don't want all records during 5 days ( 24*5days ) . Only I need  records
> at 5 days ago ( for instance 24 hours on 26 th July 2011) ?
>
> How can I do that ?
>
>
>
>>Depends on how your table is set up (you're going to need a date in the
> data...) but probably something along the lines of "where createDate =
> date_sub(now(), interval 5 days)".
>
>> Hi
>>
>> How can I get all records exact 5 days ago from a table, neither 6
>> days nor
>> 4 days ?
>>
>> Could you give me an example ?
>>
>> Thanks
>>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>
Thread
How select all records exact x days ago ?yavuz maslak31 Jul
  • Re: How select all records exact x days ago ?Johan De Meersman31 Jul
    • RE: How select all records exact x days ago ?yavuz maslak31 Jul
      • Re: How select all records exact x days ago ?shawn wilson31 Jul
      • Re: How select all records exact x days ago ?MySQL)1 Aug
      • Re: How select all records exact x days ago ?Johan De Meersman1 Aug