Results 1 to 4 of 4

Thread: date less x days in SQL[resolved]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member thebloke's Avatar
    Join Date
    May 2003
    Posts
    358

    Resolved date less x days in SQL[resolved]

    Guys,

    I'm sure this is straightforward enough but my brain hurts at the moment.

    I want to run a query that gives me data for the last 7 days/month or whatever.

    So I need to do something like:

    select * from tblcounterv3
    where countdate between ('a date a month ago' and convert(varchar,getdate(),103)

    It's the 'a date a month ago' that I don't know how to work out.

    Hope this makes some sense!

    Cheers


    Peter
    Last edited by thebloke; Aug 25th, 2005 at 04:03 AM. Reason: resolved
    The Bloke
    www.blokeinthekitchen.com
    making cooking cool for blokes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width