I have a process , in which i need the first and last days of the last week. For example, if the process is running on 29.08.2022 then i need to get the period 22.08.2022 and 28.08.2022. How can i get that ? Please help
EndDate = Today.AddDay(-1)
StartDate = Today.AddDay(-7)
How about the following expression?
targetDate = New Date(2022,8,29)
It’s very easy; all you have to do is define the date range by adding the beginning and ending dates, and you’re good to go. If you follow these steps, you will no longer have an issue.
Thank you for replying. I would like to have the First and Last day of Last week. So if the process runs today, then the FirstDayOfLastWeek =22.08.2022 and FirstDayOfLastWeek= 28.08.2022.
How about this expression?
Start Date is 22.08.2022
FirstDayOfLastWeek = Today.now.AddDays(-((now.DayOfWeek - System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.FirstDayOfWeek + 6) Mod 7)-7).Date
Last Date is 28.08.2022
FirstDayOfLastWeek = Today.AddDays(8 - Weekday(Today)-7)
You want the last and first day of the week from the day when process is running.
For example if you are running the process today means 01-09-2022, you want the first and last from 01-09-2022?
@anit.michael1 , Welcome to Uipath Commubity
Try this , use Modify date activity. Its may helps you.
You can usemodify date activity to achieve this.
How to Modify Date in UiPath? Modify Date activity explained with demo
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.