Find the number of days in a month and year in UiPath

Sometimes when we want to schedule a process or to write some business logic with respect to DateTime.

This particular task might be useful to complete the workflow design.

When there is a leap year in February we will be having 29 days per month, so this is where I can see the most use of finding the number of days in a particular month and year.

Let’s get into the implementation of this task.

Firstly, let us see the syntax for this:

Datetime.DaysInMonth(year,month)

Step1: Drag and drop the Assign Activity and write the code that is mentioned here:

days count in a month or year

Here:

daysCount is an integer variable that holds the value returned by the code that we are using.

Step2: Drag and Drop a message box activity to verify the output.

days count in a month or year

In the year 2024, February month has 29 days because it is a leap year.

This is how we get the count of days in a month using UiPath.

Happy Learning!

Like this post then let your friends know about this-:

Leave a Reply

Your email address will not be published. Required fields are marked *