1

I have a SP List with multiple columns, two of them are Start Date and End Date. I added this list view web part to a page and added two date filter columns connected to Start Date and End Date. This filter only works when exact Start Date or End Date is selected.

How can i add Greater than Start Date and Less than End Date functionality to the filter. So that when i select a Start Date and a End Date, all items falling in that range should be visible after filtering.

Thanks

3 Answers 3

2

In a SharePoint view you can add a filter on any date column but since there is no hint as to the date format, the secret sauce is:

MM/DD/YYYY

You can see how I set up a range below.

enter image description here

If you enter an invalid date, there is a saving grace that SharePoint will save you from yourself.

enter image description here

Don’t forget that you can always use a relative filter as well. An example of this would be to filter on content over the past week, you’d enter a value like this below.

enter image description here

1
  • Probably would want And, not Or, to get something within the range. And he was saying he had columns set up for the Start and End dates, so he probably wouldn't be hard-coding the date in.
    – vapcguy
    Nov 30, 2021 at 22:33
0

Setting up multiple date filters to filter a list by a date range is possible out of the box in SharePoint 2010.

Using date filter web parts to send values to a lists parameters we can get the list to filter by a date range.

But not sure this works for SharePoint Online but it is straight forward using the SPD so it might be possible using below mentioned reference links.

SharePoint: List filtering by date range

Filter List Using Date Range of a Column in SharePoint

Haven't tested it yet for SharePoint Online.

3
  • blog.pentalogic.net/2014/05/…
    – AXA240778
    Jun 1, 2016 at 13:08
  • Is it working for you?
    – Hardik
    Jun 1, 2016 at 13:09
  • Instead of just saying something is possible, describe how, and not just with links. First link has a page that has been wiped. 2nd one uses SPD - I saw in the comments where they claim the author was using SPD 2010 and that the process is different in 2013, where he said he "used the web browser to connect to said parameters" instead of using SPD. I'm assuming he meant he opened up his list in a browser and proceeded to create the List View webpart directly on the page. This process should have been summarized to create a better answer.
    – vapcguy
    Nov 30, 2021 at 22:44
0

You would need to create a view based on your Start and End dates. If you want items that have a Start Date before or equal to today, but do not end until after today, you can do something like this in your new view's filter:

Start Date

is less than or equal to

[Today]

AND

End Date

is greater than

[Today]

If you have another date field that serves to make the Start and End date range valid, such as an [Incident Date] that happened between them, you could use that instead of [Today]. It would then show you items where that [Incident Date] was between [Start Date] and [End Date]. If you wanted to hard-code the end date, it takes the form MM/DD/YYYY, such as 12/31/2021.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.