Display Current Week

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Presto731
    New Member
    • Jul 2007
    • 53

    #1

    Display Current Week

    Today is apparently date help day for me. its my 2nd question already. :)

    If I have a table that has a list of scheduled delivery dates. How do I show that in a query to only display the current weeks deliveries. Our week runs from Sunday to Saturday
  • damonreid
    Recognized Expert New Member
    • Jul 2007
    • 114

    #2
    In your query use the:
    Date()+7

    Functionality.



    EDIT: This will only give seven days from today, not from last Sunday.

    Comment

    • Presto731
      New Member
      • Jul 2007
      • 53

      #3
      Originally posted by damonreid
      In your query use the:
      Date()+7

      Functionality.



      EDIT: This will only give seven days from today, not from last Sunday.
      That I can do. Is there a way to show a block of days each week so I can just see the current week. If I only do date()+x,

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        For any given date, with Sunday as the first day of the week:

        FirstDayOfWeek = date-(weekday(date)-1)

        LastDayOfWeek = FirstDayOfWeek + 6


        You could, of course, replace Date with a variable or control that holds a valid date.

        Good Luck!

        Linq ;0)>

        Comment

        • Presto731
          New Member
          • Jul 2007
          • 53

          #5
          thanks, you're my date sage today

          Comment

          • missinglinq
            Recognized Expert Specialist
            • Nov 2006
            • 3533

            #6
            Glad we could help!

            Linq ;0)>

            Comment

            Working...