I have an excel sheet in which I have to filter the datatable on 2 points
- If status is ABC Completed.
- IF Current day is Monday than filter the Completion dates based on Friday,Saturday,Sunday.
Using the above filtering the datatable can be empty also if both the conditions do not match.
I have attached the excel sheet for the same.
Book1.xlsx (1.2 MB)
I have managed to solve for the Filtering of Status, but can anyone suggest on how to filter based on the above 2nd condition.
SELECT * FROM YourTableName
WHERE Status = ‘ABC Completed’
AND (Weekday(Now()) = 2 AND Weekday(CompletionDate) IN (6, 7, 1))
This code I have to run on assign activity or invoke code??
use Assign activity assign to one variable
The datatype of the variable will be Datatable??
Also It is giving error
Try this below xaml is the code
forum.xaml (11.7 KB)
for your requirement
Thanks for the Help.
I got the solution
Assign a data table and paste the below query
DT.Select(“[Date Column] >= #”+Dates.ToString +“# AND [Date Column] <= #”+Dates2.ToString+“#”).CopyToDataTable
Where Date Column is the column of your Datatable containing Date
Dates and Dates2 are the variables with datatype date time.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.