1

How to modify the view based on these two columns "start date" and "Expire date", I want to show the list item values only between start date and Expire date not the older or future items in the list.

whenever adding a new item it should only show when the current date is between "Start date" and "Expire date".

how to achieve this, is there a way to filter the view or can we customize this javascript.

Thanks in advance

0

2 Answers 2

1

Create a new view, or edit the existing view, and add a Filter.

In the example below, "[Today]" is dynamic built-in variable that represents the current date and time. Note the selection of "AND" and not "OR".

This example would include items where the start date equals today. To be "between" the two dates, change the "is less than or equal to" and "is greater than or equal to" to "is less than" and "is greater than".

enter image description here

2
  • HI Mike, this works perfect, can we do this filter with date and time both, for example if Both columns has time values let's say if "expire date" is "today date and 8 AM".
    – sammen
    Jan 28, 2018 at 0:26
  • Add a Calculated column. Add 8 hours to the expire date column as a fraction of a day. (So, 8/24 or .333333. I.e. [Expire]+0.33333) Modify the view to filter on the Calculated column instead of the Expire Date column. Jan 28, 2018 at 1:11
0

In this scenario , you can create a filter by :

Start Date >= [Today] AND End Date <= [Today]

How to view records that fall between 2 date range in sharepoint?

Your Answer

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

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