How can i automate start date and end date of the month in the website in uipath


how can i automate the start date(first day of the month) and end date(last day of the month) in every different month without using input dialog. Mean robot do everything. There are any function tat i can use for?

Hi @jiejie.

Basically UiPath can do it using Orchestrator scheduler, you just set the schedule at first and end day of the month. But, can you more specific, what process you are aiming for ?


@riefnaibaho My process is after i set the start date and end date, i submit and it will download the timesheet report for me. I want my timesheet report date start at first day of month and end date of month, mean every month robot help me to automate the report.

@riefnaibaho or can i use this :slight_smile:

Use the following in Assign Activity

dateTime beginDate = new DateTime(now.Year,now.Month,1)
dateTime lastDate = beginDate.AddMonths(1).AddDays(-1)

Your expected output :

string startDate = beginDate.ToString(“dd-MM-yyyy”)
string endDate = lastDate.ToString(“dd-MM-yyyy”)

Note: Use this startDate and endDate Variable in you rinput activity (TypeInto)

Sorry, i just already got your point. Yes exactly you can input the start and last day of the month automatically.

i think you can use your workaround above. You can use whileDo activity to automatically iterate the months. Below i attach an example:

dateTest.xaml (6.1 KB)


@riefnaibaho i can run my program, but the date is show as this.04

@riefnaibaho the date and month are reverse


I think you are passing in this format: MM/dd/yyyy. Pls change the format like this: dd/MM/yyyy

1 Like

@lakshman not, my format is already dd/MM/yyyy05


Could you please share your workflow and need to check once.


My workflow is as shown above. Thanks.


Try this format: MM/dd/yyyy also. Print the values before typing into there. And also show me output for both ways what is printing.

Hi @jiejie,

Don’t put the ‘type into’ activities outside the while loop (if you want the months value iterate). And also just put this script in the input box StartDate.ToString("dd/MM/yyyy mm:ss") & EndDate.ToString("dd/MM/yyyy mm:ss")


Hi @jiejie by using same DateTime function can we by default take last day of on jan it should use 31st of Jan and on Feb 28th of feb.plz help

In StudioX Environment for Similar Situation, in my Project_Notebook.xlsx file, i have used: =TEXT(LastMonthStartDate,“DD.MM.YYYY”) in cell and assigned the same cell value while using TypeInto Activity, Since Assign Option is not available in StudioX environment. Hope it helps