Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2005
    Posts
    165

    Unanswered: Selecting a range of dates...

    Hello all. I'm trying to query some dates for a report. Howerver, the only dates I want are those from today to 60 days back. I know there's an easy way to do this but I'm just not doing something right. Thanks in advance!!

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    SELECT * FROM SomeTable WHERE (SomeDate BETWEEN #" & Date & "# AND #" & DateAdd("d",-60,Date) & "#) ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    how about this

    Code:
    SELECT tblDate.fldDate
    FROM tblDate
    WHERE (((tblDate.fldDate) Between DateAdd("d",-60,Now()) And Now()));
    changing the fields and tables to your ones


    HTH
    Dave

    sorry m owen
    same thread same answer
    Last edited by DavidCoutts; 01-27-05 at 12:21. Reason: came in second

Posting Permissions

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