Results 1 to 4 of 4
  1. #1
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    862

    Excluding Timeframe in equation

    Here is what I am using:


    IIf(DateDiff("ww",[Date_ID],[Date_Closed])>1,(DateDiff("ww",[Date_ID],[Date_Closed]))-1,0)

    This works great if there are no exceptions. As usual we have discovered an exception. What if I wanted to exclude a weeks time? I would gather if you have 2 different weeks time you would put an And in it. For now I need to exclude a week from this.

    21 May 2015 to 27 May 2015.

    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    the new END date would be:

    dateadd("d",-7,[Date_Closed])

  3. #3
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    862
    That would work for an overall, but I need it to affect only those actions that were in that time frame.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Don't understand. If you need to exclude records then apply filter criteria to the dataset.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Equation help
    By Thompyt in forum Programming
    Replies: 7
    Last Post: 05-15-2015, 05:31 PM
  2. Timeframe query criteria
    By Emma35 in forum Queries
    Replies: 10
    Last Post: 07-03-2013, 03:51 AM
  3. Making an equation
    By joce in forum Access
    Replies: 1
    Last Post: 10-27-2011, 09:56 AM
  4. Another equation almost done now
    By stryder09 in forum Access
    Replies: 4
    Last Post: 02-18-2011, 12:18 PM
  5. Another equation question
    By stryder09 in forum Access
    Replies: 3
    Last Post: 02-17-2011, 11:41 AM

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