Hello
How to get previous of previous week Friday to previous week Thursday date.
Example: Date format is (dd/MM/yyyy)
All dates from 03/02/2023 to 09/02/2023
I take invoice dates from web portal and store into the data base.
I have highlighted dates in the above image. Date consider as previous of previous week Friday to previous week Thursday date.
When I am run BOT in next Monday(20 Feb 2023) it will pickup all dates from 10/02/2023 to 16/02/2023
How to get that all dates?
Thanks
Minal Patil
sarathi125
(Parthasarathi)
February 13, 2023, 12:59pm
2
@minal.patil ,
Check this workflow, it may help you
GetDatesBetween2Dates.xaml (6.5 KB)
It will get the error
For Each: Specified argument was out of the range of valid values. (Parameter ‘count’)
HI @minal.patil
Checkout this
To get previous of Previous week friday
Today.AddDays(14*Cint(Today.DayOfWeek<=DayOfWeek.Friday)+(DayOfWeek.Friday-Today.DayOfWeek)).ToString("dd/MM/yyyy")
To get last week thursday
Today.AddDays(7*Cint(Today.DayOfWeek<=DayOfWeek.Thursday)+(DayOfWeek.Thursday-Today.DayOfWeek)).ToString("dd/MM/yyyy")
To get all the dates you can check this steps
Assign list of string variable,
ListOfDates = New List(Of String)
For Each Enumerable.Rage(0,7)
Append item to Collection and the item will be
Today.AddDays(14*Cint(Today.DayOfWeek<=DayOfWeek.Friday)+(DayOfWeek.Friday-Today.DayOfWeek)).AddDays(Cint(item.ToString)).ToString("dd/MM/yyyy")
After the loop completed in the list you will have complete list of dates in the list
Sequence1.xaml (16.6 KB)
Regards
Sudharsan
Regards
Sudharsan
It solve and how can I compare this all date to web portal invoice dates.
In web portal invoice dates are 03/02/2023,06/02/2023 to 09/02/2023.
Means 04/02/2023 and 05/02/2023 date are not available.
How can I compare and downloads this invoices.
Note:
Date is available between 03/02/2023 to 09/02/2023 in web portal then download the invoice.
So can you able to datascrap this data from website? @minal.patil
If yes do that and save them in a datatable
Counter =1
For each row in datatable and in the value field give the extractdatatable variable
If activity and the condition will be
String.Join(",",ListofDates).Contains(CurrentRow("Invoice Date").ToString)
True → Click and use dynamic selectors with the attribute of idx there to click on the correct
ASSIGN Counter= Counter+1
Else → Leave it empty
You can check here for dynamic selectors
Hello Everyone,
Checkout this tutorial for knowing about a Dynamic Selector.
What is a Dynamic Selector?
Here are the Steps
In this example i am using a dynamic selector with the text attribute , you can use what ever the attributes based on your project needs
Step1:
Add Assign Activity and use the text in which you need to use in your dynamic selector
[image]
Step2:
Open UI Explorer in Click Activity or any that represents a action in the ui element and indicate on screen and check…
Regards
Sudharsan