Results 1 to 4 of 4
  1. #1
    jd316632 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    4

    Weekday excluding weekends

    I have a query that pulls data from a Due Date column based on the date. I want to see what I missed from yesterday.



    However on Monday it shows me Sunday. I want it to instead skip Saturday/Sunday and use Friday if it is Monday but I cannot for the life of me accomplish this. I've used Google and attempted to use Weekday, DatePart and VBA code but cannot get something that seems to simple to work.

    • The Due Date field is in date/time format (1/1/2010 4:30 PM) I have it formatted to just the date as it made pulling the data based on the criteria easier (Format([Due Date],"mm/dd/yyyy")
    • The criteria currently used with the Due Date field is Format((Date())-1,"mm/dd/yyyy")

    If you need any additional information please let me know. Thanks in advance for any assistance.

  2. #2
    kimmer is offline Competent Performer
    Windows 7 Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    100
    IIf(Weekday(Date())=6,Format(Date()-3,"mm/dd/yyyy"),Format(Date()-1,"mm/dd/yyyy"))

  3. #3
    jd316632 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    4
    Quote Originally Posted by kimmer View Post
    IIf(Weekday(Date())=6,Format(Date()-3,"mm/dd/yyyy"),Format(Date()-1,"mm/dd/yyyy"))
    Not returning any data, for Friday I had 20+ due.


  4. #4
    kimmer is offline Competent Performer
    Windows 7 Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    100
    oops! change the 6 to a 2. sorry.

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

Similar Threads

  1. Individual weekday count in a month
    By Silver_A in forum Queries
    Replies: 6
    Last Post: 04-16-2010, 08:14 PM
  2. Query DateDiff calculation excluding weekends
    By Masterfinn in forum Queries
    Replies: 3
    Last Post: 04-01-2010, 09:46 AM
  3. Replies: 4
    Last Post: 02-08-2010, 11:17 AM
  4. Excluding data in a query
    By lpdds in forum Queries
    Replies: 1
    Last Post: 12-16-2009, 08:06 PM

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