In a few business processes that we automate, some times we have to count the number of days in a given month.
Let’s see how to do it in UiPath…
Int date_Variable = Datetime.DaysInMonth(_year,_month)
1.Replace the “_year” with your required “Year”
2.Replace the “_month” with your required “Month”
Implementation using UiPath :
Let us implement a workflow which takes “Year” and “Month” as input and outputs the no.of days in that month i.e.
Drag “Input Dialogue” activity into the design panel and create a variable to save the “year” provided by the user.
Drag “Input Dialogue” activity into the design panel and create a variable to save the “month” provided by the user.
Drag “Message Box” activity into the design panel to display the days count.
Click here to download the Source Code…
Hope it has helped you…