Results 1 to 5 of 5
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Date query for the past 2 weeks

    I need the dates between now and the past 14 days.



    will this work?

    <14 And Date()
    Last edited by burrina; 02-11-2013 at 01:29 PM. Reason: code

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Perhaps you could use the DateDiff() function in the criteria row of a query
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Between (Date()-14) And Date()

  4. #4
    wnicole is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    118
    I tried this but was wondering how do I write this in an IIF statement.
    I want to get a text field going for example:
    IIF Between (Date()+7) And Date() THEN "Certification Alert"

    Can you assist?

  5. #5
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    The answer I gave was an answer to be used in the Criteria section of a query, not a calculated field. If you would like to do the same thing in a calculated field, you would do something like:
    Code:
    Expr1: IIF(([SomeDateField] >= Date()) AND ([SomeDateField] <= Date()+7),"Certification Alert","")

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 11-22-2011, 11:06 AM
  2. Replies: 2
    Last Post: 10-08-2011, 06:33 PM
  3. Date Add 26 weeks minus 1 day
    By ker9 in forum Queries
    Replies: 3
    Last Post: 07-26-2011, 01:20 PM
  4. Date Parameter Help - prior 13 weeks
    By acw1980 in forum Access
    Replies: 1
    Last Post: 11-12-2009, 10:30 AM
  5. Date Past Function
    By Laney in forum Access
    Replies: 4
    Last Post: 05-21-2008, 07:19 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums