Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    pranvera is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2010
    Posts
    8
    Quote Originally Posted by slave138 View Post
    Try:
    Code:
    SELECT MarDaily.*
    FROM MarDaily
    WHERE (((MarDaily.[Req Delivery Dt/Tm])>= iif(datepart("w",date()) <=4 ,date()-5,date()-3)));

    YES, this works correctly. Thank you!



    Hope last question: will same formule work for days older than 3 days (same issue with weekends) like:

    <= iif(datepart("w",date()) <=4 ,date()-5,date()-3

  2. #17
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    Quote Originally Posted by pranvera View Post
    YES, this works correctly. Thank you!

    Hope last question: will same formule work for days older than 3 days (same issue with weekends) like:

    <= iif(datepart("w",date()) <=4 ,date()-5,date()-3
    It should, but only if you remember the closing parentheses:

    Code:
    <= iif(datepart("w",date()) <=4 ,date()-5,date()-3)
    Also, you might want to be careful to include a bottom limit or you will get *everything* older than 3 weekdays.

  3. #18
    pranvera is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2010
    Posts
    8
    thanks all of you for help!

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. How do I filter on this ?
    By _Chris_ in forum Access
    Replies: 7
    Last Post: 08-12-2010, 08:34 PM
  2. Another removing weekends question
    By catguy in forum Access
    Replies: 6
    Last Post: 08-03-2010, 07:59 AM
  3. Filter on #Num!
    By marley in forum Access
    Replies: 5
    Last Post: 07-28-2010, 06:59 AM
  4. Weekday excluding weekends
    By jd316632 in forum Queries
    Replies: 3
    Last Post: 05-24-2010, 02:01 PM
  5. Query DateDiff calculation excluding weekends
    By Masterfinn in forum Queries
    Replies: 3
    Last Post: 04-01-2010, 09:46 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