Condition Builder related to Last 3 months

tanveer
Tera Contributor

tanveer_0-1735578727407.png

Why are tickets opened in the current month also being displayed when using the condition builder for "Opened tickets in the last 3 months" 
For example, if the report is run in December, it should only show tickets opened in Sept, Oct and Nov.
Does ServiceNow treat months as days instead of considering the exact month? Can some please help here.

1 ACCEPTED SOLUTION

PritamG
Mega Guru

ServiceNow's last 3 months condition calculated arolling 90-day range, not exact calendar months. to show only tickets from specific months (e.g., sep-nov) use custom date filter or a scripted query specifying the exact start and end dates.

View solution in original post

3 REPLIES 3

Harsh Vardhan
Giga Patron

Hi @tanveer  Last 3 month consider current month as well. 

This filter has used two javascript method in the backend  gs.beginningOfLast3Months() and 

gs.endOfLast3Months()
 
You can execute this method and then you will get the result. 
  gs.info(new GlideDateTime(gs.beginningOfLast3Months())+ '  ' + new GlideDateTime(gs.endOfLast3Months()));

 

Thanks,

Harsh

PritamG
Mega Guru

ServiceNow's last 3 months condition calculated arolling 90-day range, not exact calendar months. to show only tickets from specific months (e.g., sep-nov) use custom date filter or a scripted query specifying the exact start and end dates.

tanveer
Tera Contributor

Yes, i think its taking days and not a exact month for the query - "last 3 months"