Hi Abhishek,
Create a javaaction where you can pass the start and end date of the particular month and use the below code
public static void main(String[] args) throws Exception {
System.out.println(countDays("07/02/2018", "15/02/2018"));
}
public static int countDays(String startDate, String endDate) throws Exception {
int workingDays = 0;
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
Calendar startdate = Calendar.getInstance();
startdate.setTime(sdf.parse(startDate));
Calendar enddate = Calendar.getInstance();
enddate.setTime(sdf.parse(endDate));
while (!startdate.after(enddate)) {
int day = startdate.get(Calendar.DAY_OF_WEEK);
System.out.println(day);
if (day != Calendar.SUNDAY) {
workingDays++;
}
// increment start date, otherwise while will give infinite loop
startdate.add(Calendar.DATE, 1);
}
return workingDays;
}
Hi Abhishek,
Can you explain your question a bit more clearly, what you are trying to achieve and what you have implemented it
I attach you my microflow solution
in second condition we checked "formatDateTime($date, 'EEE') = 'Sat' and parseInteger(formatDateTime(addDays($date,1),'dd'))= 2"