Get the total number of incidents opened over last 6 months excluding weekends.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2018 03:58 PM
Hi everyone,
Just one small help and I'm not sure of the right approach.
I want to pull out the total number of incidents opened in the last 6 months without including weekends i.e. Saturday and Sunday. Current filter conditions do not show this option. Anybody tried this and can help me out?
Thanks a ton,
Deepthi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2018 04:36 PM
we can something like this,
var gr = new GlideRecord('incident');
gr.addQuery('sys_created_on', '>=' , 'javascript:gs.daysAgo(180)');
gr.query();
while(gr.next()){
var dt = new GlideDateTime(gr.sys_created_on);
var dow = dt.getDayOfWeek();
if(dow!=6 && dow!=7){
gs.print(gr.number);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2018 09:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2018 02:06 PM
Deepak,
Awesome ! this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2018 02:18 PM