Results 1 to 3 of 3
  1. #1
    bigspace55 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    11

    How do I go back to previous weekday?

    Hello there! I am trying to take a table with a lot of dates on it and what I want to do is make a query that will give me only the data in the table where the date is between the previous thursday through the previous wednesday. For example, Let's say today is thursday or friday and I want the data for all of the dates between last thursday through this wednesday...what would I type into the date criteria field in order to get this?

  2. #2
    Stingaway is offline Efficiency Junkie
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    The deep south. Keep going until you hit water basically.
    Posts
    224
    You can use something similar to:

    Between Now()-7 And Now()-2

    Just change the numbers a bit to get the exact dates you want.

  3. #3
    bigspace55 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    11
    I figured it out...ended up doing this

    Between Date()-IIf(Weekday(Date())=1,10,IIf(Weekday(Date())=2,11, IIf(Weekday(Date())=3,12,IIf(Weekday(Date())=4,13, IIf(Weekday(Date())=5,7,IIf(Weekday(Date())=6,8,II f(Weekday(Date())=7,9))))))) And Date()-IIf(Weekday(Date())=1,4,IIf(Weekday(Date())=2,5,II f(Weekday(Date())=3,6,IIf(Weekday(Date())=4,7,IIf( Weekday(Date())=5,1,IIf(Weekday(Date())=6,2,IIf(We ekday(Date())=7,3)))))))

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

Similar Threads

  1. Business Weekday?
    By HMEpartsmanager in forum Queries
    Replies: 2
    Last Post: 10-01-2012, 01:28 PM
  2. Replies: 4
    Last Post: 05-21-2012, 08:21 AM
  3. Help with Weekday Function
    By Juan4412 in forum Queries
    Replies: 3
    Last Post: 10-18-2011, 07:14 AM
  4. Weekday Name from a Date
    By Coors in forum Queries
    Replies: 9
    Last Post: 09-26-2011, 03:08 PM
  5. Weekday excluding weekends
    By jd316632 in forum Queries
    Replies: 3
    Last Post: 05-24-2010, 02:01 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