The field is always set to the last day of the month unless there are only 3 working days of the month left, when that is the case it would be changed to the first 3 working days of the next month.
yah of course
to get the previous month last date New Datetime(now.year, now.Addmonths(-1).month, Datetime.Daysinmonth(now.year,now.addmonths(-1).month))
Fine lets take like
use a if condition Now.day = Datetime.DaysInMonth(now.year,now.month)-3 AND
Not Now.Adddays(3).Dayofweek.ToString.ToUpper.Equals(“SUNDAY”) AND
Not Now.Adddays(3).Dayofweek.ToString.ToUpper.Equals(“SATURDAY”)
if the above expression is true it will go to THEN part where we can use another IF condition with this expression for 3rd working day of the next month New Datetime(now.year,
now.month,
NOT (New Datetime(now.year,now.addmonth(1),1).Day)+3)).Dayofweek.ToString.ToUpper.Equals(“SUNDAY”)
OR
NOT New Datetime(now.year,
now.month,
(New Datetime(now.year,now.addmonth(1),1).Day)+3)).Dayofweek.ToString.ToUpper.Equals(“SATURDAY”)
–and if this is getting satisfied it will go to THEN part where we can assign a string variable like this in_strdate = New Datetime(now.year, now.month, (New Datetime(now.year,now.addmonth(1),1).Day)+3)).ToString(“dd/MM/yyyy”)
or it will go to ELSE part where we can use another assign activity with a string variable like in_strdate = New Datetime(now.year, now.month, (New Datetime(now.year,now.addmonth(1),1).Day)+5)).ToString(“dd/MM/yyyy”)
–now finally in the outer if condition if the condition fails it will go to ELSE part where we can keep this expression you have already
New Datetime(now.year, now.Addmonths(-1).month, Datetime.Daysinmonth(now.year,now.addmonths(-1).month))
hope this would help you
kindly try this and let know for any queries or clarification
Cheers @shawnmurray