Last month of the first date and end of the date

Currently i am using an assign to get my checkdate

checkforpreviousmonth = Now.Date.AddMonths(-1).ToString(“MM”)

checkforpreviousmonth set as an string

now i wan to find my last month first date and end date of my last month how can i find it ?

Hello, you could refer to these two past discussions:

How to get the date value of first day of previous month? - Learn - UiPath Community Forum

Get the last day of specific month - Help - UiPath Community Forum

1 Like

Thanks i found it

thanks :slight_smile:


How about using ModifyDate activity as the following?

We can also get first date of previous month.




First date = New DateTime(today.Year, today.Month, 1).AddMonths(-1)
Last date = New DateTime(today.Year, today.Month, 1).AddDays(-1)


1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.