Hi ,
You can calculate working days by using Java Action.
You can create a new java action and the following code will return the working days only
DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
Date date1 = df.parse(DueDate);
Date date2 = df.parse(CurrentDateTime);
Calendar cal1 = Calendar.getInstance();
Calendar cal2 = Calendar.getInstance();
cal1.setTime(date1);
cal2.setTime(date2);
long numberOfDays = 0;
while (cal1.before(cal2)) {
if ((Calendar.SATURDAY != cal1.get(Calendar.DAY_OF_WEEK))
&&(Calendar.SUNDAY != cal1.get(Calendar.DAY_OF_WEEK))) {
numberOfDays++;
}
cal1.add(Calendar.DATE,1);
}
return numberOfDays+1;
Note : The variable numberOfDays holds the value of Working days.
I hope this helps you.