How to add "Last 2 Months" Filter in reports?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2020 06:07 AM
I want to add "Last 2 Months" as a choice in Date filter .Then I checked some posts related to this topic in community couldn't figured it out.I tried to customize by adding condition in "Get date filter Options for Date filters" Business Rule ,hence not reflecting on reports.Please Find the below screen shot for reference.
Any Assistance on this would be greatly appreciated.
- Labels:
-
Time Card Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2020 06:12 AM
Hi Lakshmi,
you can try using last 60 days
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2020 06:32 AM
Hi Ankur,
On accountability of Business Requirement,we cant customize in such a way.We need to get exact last 2 months report.Irrespective of current month it should fetch last 2 months data.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2020 06:33 AM
Hello
You may need to modify the "Get Date Filter Options for Date Filters" Business Rule if you have your heart set on creating a new option. You could add a line such as:
answer.add('042_Last 2 months@javascript:gs.monthsAgoStart(2)@javascript:gs.endOfThisMonth()', gs.getMessage('Last 2 months'));
You may want to also take a look at this related post:
Hope that helps!
If it did, please mark as Helpful and consider setting this reply as the Correct Answer to the question, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2020 06:54 AM
Hi ,
I couldn't find any change after placing this code.Its not working.I wanted to know is this something can be done by service now side?Because ,Even after Modifying BR ,not really working.