Supporters of End User
Web

How To: Display Files in a SharePoint Library That Were Created Between a Specific Date Range

Item is currently unrated. Press SHIFT+ENTER to rate this item.1 star selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+ESCAPE to leave rating submit mode.2 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.3 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.4 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.5 stars selected. Press SHIFT+ENTER to submit. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.
Categories:Views; Libraries and Lists; Document Library; Site Manager/Power User; Out of the Box; MOSS; WSS; 2007; 2010

You may also be interested in: SharePoint Apps by Cybozu

 

Editor's note: Contributor Dean Virag is a Technical Trainer for ASCD. Follow him @techtrainerdean

Author's Note: Below is a how-to article that I wrote for a lawyer in NYC. He needed to find all documents in a document library that were created between two dates and then move them out of SharePoint and back into a networked file share.

So, he first contacted a prominent SharePoint consulting company there in NYC who said that the problem could only be handled through custom code. Then, after reading one of my posts on EUSP, he contacted me. I was able to solve his problem in about 10 minutes – using nothing but out-of-the-box functionality. It took more time for me to create this how-to article than it did to come up with the solution.

So the first part of this article is about creating a view that displays documents that were created between two different dates. The second part covers the same thing, only using Windows Explorer (in Windows 7) instead of SP.

He followed the second part and was able to get the files out of SharePoint that he needed. In the end, I did not charge him for my time (about an hour total) and I saved him from wasting thousands of dollars on a custom solution when one was not necessary.

The Problem:

Finding and aggregating files stored in folders in a document library can be a nightmare, especially when you are talking about thousands of files. The problem grows when you throw in the need to display only files that were created between two dates.

But, do not fear good SharePoint citizen! There is an easy solution to your problem, one that requires no coding and can be accomplished in a short amount of time – and here it is.

Solution 1: Display Files in a SharePoint Library View.

  1. Go to your document library.
  2. Click the Library Tools à Library tab.
  3. 2012-11-26-FilterOnDateRange-01.png

  4. Click the Create View.
  5. 2012-11-26-FilterOnDateRange-02.png

  6. Click Standard View.
  7. 2012-11-26-FilterOnDateRange-03.png

  8. Give your view a name.
  9. 2012-11-26-FilterOnDateRange-04.png

  10. Select the columns that you want to include in the view. Make sure that Created is checked. Note: Created is the date that the document was added into SharePoint.
  11. 2012-11-26-FilterOnDateRange-05.png

  12. Optional: Select a value or values to sort your view results. For example, you could choose to sort by created date displayed in descending order. The documents created most recently would be displayed at the top of the list.
  13. Add the date range to filter the results.
    1. In the Filter group, click the Show items only when the following is true option.
    2. 2012-11-26-FilterOnDateRange-06.png

    3. Select to show files where Created is greater than or equal to your desired start date. In this case we want to show all files created after September 11, 2011.
    4. 2012-11-26-FilterOnDateRange-07.png

    5. Select and.
    6. 2012-11-26-FilterOnDateRange-08.png

    7. Select to show the files where Created is less than or equal to [Today].
      Note: [Today] is a dynamic variable that will automatically use the current date.
    8. 2012-11-26-FilterOnDateRange-09.png

    9. In the Folders group, select to Show all items without folders.
    10. 2012-11-26-FilterOnDateRange-10.png

    11. In the Item Limit group, increase the Number of items to display. In this example, the view will return the documents in batches of 100 files.
    12. 2012-11-26-FilterOnDateRange-11.png

    13. Click OK to save and display your view.
    14. 2012-11-26-FilterOnDateRange-12.png

    15. A flat list of files that were created between a range of dated will be displayed in the view. However, SharePoint does not make it easy to do things like copy or move multiple files. For that, we need to use Windows Explorer!

Solution #2: Filter and Display the Files Using Windows Explorer

  1. Go to your document library.
  2. Click the Library Tools -> Library tab.
  3. 2012-11-26-FilterOnDateRange-13.png

  4. Click the Open With Explorer button to display the contents of the document library in Microsoft Windows Explorer.
  5. 2012-11-26-FilterOnDateRange-14.png

  6. Right-Click in the column header section of Windows Explorer, and select Date Created. That will add the Date Created column to Windows Explorer.
  7. 2012-11-26-FilterOnDateRange-15.png

  8. Roll your cursor over the Date Created column header and click the down triangle that appears.
  9. 2012-11-26-FilterOnDateRange-16.png

  10. A calendar will appear under the down triangle. Click the left triangle to navigate back to the month/year that you want to start filtering the files.
  11. 2012-11-26-FilterOnDateRange-17.png

  12. Once you have reached the desired month/year. Click the exact date that to begin filtering your documents and drag your cursor down to the bottom of the calendar without releasing the mouse click. Continue to move the cursor down to go into the next most recent month. Be careful, the selector moves fast! You might have to try it a couple of times to get the hang of it.

  13. 2012-11-26-FilterOnDateRange-18a.png

    2012-11-26-FilterOnDateRange-18b.png

    Click on Sept 11, 2012….

    And drag downward to select into October. Stop on the desired date.


  14. The files that were created between the selected date range will be automatically displayed, but in their folders. To view all the files outside of their folders, click the Search again in: Subfolders.
  15. 2012-11-26-FilterOnDateRange-19.png

  16. The display will update to show all the folders at the top of the list and all the documents below the folders.

    Note: A Folder column will automatically be added to show which folder each document came from.
  17. 2012-11-26-FilterOnDateRange-20.png

  18. You can now select all the files and copy them into a new location outside of SharePoint, such as a directory on your C drive, or a network shared drive.
  19. Repeat this process in all libraries where you want to filter files by date range.
  20. Paste all the desired files into the same folder.

2012-11-26-FilterOnDateRange-21.pngCongratulations, you have successfully filtered files based on a date range in both a SharePoint Document Library and Windows Explorer.

Comments

Nancy Skaggs

Another no-code hero

Love this great example of leveraging OOTB functionality. Kudos to you!

Posted 28-Nov-2012 by Nancy Skaggs
George Kok

also on Expire date?

Hi Dean,
 
I am puzzling to put a libray that also stores the expire date of a document, but such date in not one of the intrinsic tags of file. Any nice tip how to do that?
 
Thanks, George

Posted 29-Nov-2012 by George Kok
Dean

Expire Date

George, There is a way to connect custom SharePoint columns in certain SP lists when you connect them to MS Outlook. I have not tried it with connecting doc libraries to Outlook though. I have also not figured out an out-of-the-box way to access "non-intrinsic" SharePoint tags in Windows. However, there are 3rd party solutions for that problem. Here is one that my organization is looking at right now. http://www.colligo.com/products/sharepoint/colligo-contributor-pro/ I am sure there are plenty of others as well. Regards, Dean

Posted 29-Nov-2012 by Dean
Fatma

Question on Date Range

Hello,
 
i would like to allow the users to enter there date range .. so how can i implement this ?

Posted 17-Dec-2012 by Fatma

Notify me of comments to this article

E-mail:
   

Add Comment

Title:

 
Comment:
Email:

   


Name:

 
Url: