Hey @anjani_priya
Step 1: Get the last day of the previous month
Assign Activity:**
- To:
lastMonthEndDate(Variable of typeDateTime) - Value:
New DateTime(Now.Year, Now.Month, 1).AddDays(-1)
Step 2: Adjust if it’s a Saturday or Sunday
Assign Activity:
- To:
adjustedDate(Variable of typeDateTime) - Value:
If lastMonthEndDate.DayOfWeek = DayOfWeek.Saturday Then
lastMonthEndDate.AddDays(-1)
ElseIf lastMonthEndDate.DayOfWeek = DayOfWeek.Sunday Then
lastMonthEndDate.AddDays(-2)
Else
lastMonthEndDate
End If
cheers