Get month for particular date duration

Hi team

I need to prepare a set of activities which would give me the following results.

If current date is between first and second last date of the month included then the output should be MM/YYYY for previous month
and
if the current date is the last date of the month then the output should be MM/YYYY for current month

kindly help as i am unable to write the condition of if else.

I think we can make it in one expression:

Now.AddDays(1).AddMonths(-1).ToString("MM/yyyy")
1 Like

Hello @Aishwarya_Bhargava
Please check the Modify Date activity in UiPath.

Thanks