In the input SP_Date column contains “MM/dd/yyyy” bot has to filter date less than 7 days data compare to todays date and remove those dates in this range.
The output should be last 4 rows which are greater than 7 days and bot should delete first 2 rows
This is my concern please help me
From row In dtInput.AsEnumerable()
Let dateValue = DateTime.ParseExact(row.Field(Of String)("SP_Date"), "M/d/yyyy", CultureInfo.InvariantCulture)
Where dateValue >= dateThreshold
Select row
Check out below workflow for better understanding. I have use Build Data Table , instead of that you can use Read Range Workbook and store it in an datatable and follow the below process.
For build data table code is working but i want to read from excel sheet
To read data from excel sheet we are using Read range workbookactivity I am getting error as.
Input.xlsx (8.6 KB)
Sheet1 is your Input and Sheet2 is your Output. According toyour code please do check the Preserve Format Option in the properties of Read Range Workbook. It will work fine.
Can i get this same result filter by using filter data table activity?
In the input SP_Date column contains “MM/dd/yyyy” bot has to filter date less than 7 days data compare to todays date and remove those dates in this range.
The output should be last 4 rows which are greater than 7 days and bot should delete first 2 rows