Forum Discussion
Missile64
May 31, 2022Copper Contributor
List View to display items for the next month
I have a list in SharePoint 2010 with a datefield called "Due Date". I want to create a list view that will only show the items if the Due Date is next month, eg;
if current date = 22/05/2022, only display items with a Due Date within June 2022, or;
if current date = 15/12/2022, only display items with a Due Date within Jan 2022, etc..
Anyone know how this can be achieved without using JS?
Thanks
Create a calculated column Reminder Date and set it to [Due Date] - 30. Don't forget to set the data type to Date and Time.
Then create a view where Reminder Date is greater [Today].
- Missile64Copper Contributor
Thanks for your reply. Your suggestion is very close to what I am after. It a couple of limitations though;
1. for items that are due on the 31/07/2022 as 01/07/2022.
2. If I change it to [Today]-31 I get a similar issue where 01/07/2022 goes to 31/05/2022.
3. 1st-3rd/03/2022 would be 28th-30th/01/2022.
Thanks again 🙂
You can keep the year, decrement the month, keep the day.
=DATE(YEAR(End),(MONTH(End)-1),DAY(End))
If the date created isn't valid, it handles it by adding the number of days that are missing. So it the date falls on the 31st, it won't be a valid date in the previous month. It is off by 1 day and adds a day. For a March 31 due date, in most years, that is off by 3 days (4 in leap year) - and those days will be added.
Power Automate is also a good option depending on how much logic you need to add.