+ Reply to Thread
Results 1 to 2 of 2

How do I enter a date range ie -7 from current date in MS QUERY

  1. #1
    notsmartenough
    Guest

    How do I enter a date range ie -7 from current date in MS QUERY

    I am creating an excel pivot table using external data. I want to include
    only records that are equal to current date and past 6 days. In otherwords,
    on any day that I run the pivot table I would bet current day + 6 days prior
    data. How would I setup the criteria and value cell. I can successfully
    specify a criteria field and in the value but = date(now()) and this works
    fine for current days data but I am having trouble using the > date(now()) -
    7. Any suggestions?

    Thanks

  2. #2
    Roger Govier
    Guest

    Re: How do I enter a date range ie -7 from current date in MS QUERY

    Hi

    Personally, I would use Today() rather than Now(), unless you are sensitive
    to the hour as well.
    I your second criteria cell, are you using the = sign to show it is a
    formula i.e. =>Today()-7.
    You don't need the Date() function at all
    =Today()
    =>today()-7


    Regards

    Roger Govier


    notsmartenough wrote:
    > I am creating an excel pivot table using external data. I want to include
    > only records that are equal to current date and past 6 days. In otherwords,
    > on any day that I run the pivot table I would bet current day + 6 days prior
    > data. How would I setup the criteria and value cell. I can successfully
    > specify a criteria field and in the value but = date(now()) and this works
    > fine for current days data but I am having trouble using the > date(now()) -
    > 7. Any suggestions?
    >
    > Thanks


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1