Regarding Date Time type for Uipath

Whether we can use Date Time type to get start date and end date of a month in Uipath ? using the expression:

DateTime(pYear, pMonth, DateTime.DaysInMonth(pYear, pMonth),

Please let me know what other method is there to get first date of the month and last date of the month dynamically in Uipath

First date will be 1 right ?
Last date can be found using: int days = DateTime.DaysInMonth(year, month)
Number of days in month will be the last date.

1 Like

Yes… DateTime(Year,Month,1) would work in C# … But in Uipath when i try DateTime i get exceptions … so wondering what should be the expression to use in Uipath

It will work. use assign activity.

DateTime will works in UiPath as well.