Please help!
My team pulls up a report from a website I wish to automate the same, they select start date and end date on the website. start date is last working day and end date is current working day and please note Sunday is only non working day for the team, I am stuck on date selection.
This includes an activity named Custom Date Series
This activity will generate a list of dates based on your configuration of holiday and working day.
If you can use this activity to get the working days, your task of selecting the date here in the date time picker would be very much easier as you don’t need to worry about omitting holidays.
Check the user guide attached to the activity set and give the date pattern as required for your requirement. It will give you a list of all the dates you require omitting the unwanted
For end date i.e current date :- Date.Now.tostring(“dd”)=> op- 29 if u want full date then insted “dd” u can write “dd/MM/yyyy”
For start date first u check last date is sunday or not so use if cond
Date.now.Adddays(-1).dateofweek=“Sunday”
in Then : Enddate= Date.now.Adddays(-2).tostring(“dd”)
else : Enddate= Date.now.Adddays(-1).tostring(“dd”)
Hi, i have a similar issue but the system that i need to enter the date is a type into field, at present i have been using this formula which enters todays date
DateTime.Now.AddDays(+1).ToString(“MM/dd/yyyy”)
however if i run the bot on a friday then it should enter mondays date into the field, is there a way i can adapt this code to work for me? @ImPratham45
so in the if condition it should read
Date.now.dateofweek = “Friday”
Then: Date.Now.addDays(+3).ToString(“MMddyyyy”)
Else: Date.Now.addDays(+1).ToString(“MMddyyyy”)
so this would give me the next days date but if its friday it would give me mondays date? @ImPratham45
use a string variable say DateString,
use an assign activity and add below code inside.
if(Date.now.Adddays(-1).dateofweek=“Sunday”,
Date.now.Adddays(-2).tostring(“dd/MM/yyyy”),
Date.now.Adddays(-1).tostring(“dd/MM/yyyy”))