Siva Sandilya V
ServiceNow Employee
Options
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
03-18-2022
12:07 PM
Below code is helpful in providing list of weekday dates and can be used in dynamic filters
var num = 7;
var dateList = [];
for(var i=0;i<num ;i++){
var date = new GlideDate();
date.setValue(((''+gs.daysAgo(i+1)).split(" "))[0]);
var day = date.getByFormat('EEEE');
if(day != "Saturday" && day != "Sunday"){
dateList.push(date.getValue());
}else{
num ++;
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
