datatablevaraible.AsEnumerable.where(Function(x) x(2).ToString.Equals(datyes)).Copytodatatable
dateyes is a variable
here your input date format is coming in the form of M/dd/yy e.g 5/25/23
datatablevaraible.AsEnumerable.where(Function(x) x(2).ToString.Equals(datyes)).Copytodatatable
dateyes is a variable
here your input date format is coming in the form of M/dd/yy e.g 5/25/23
Try to change column name(Order Date as Order_Date) and run it .
use this create a dataTable variable FilteredDt=YourDTvariable.Select(“Order_Date='”+DateVariable+“'”).CopytoDataTable
DateVariable=DateTime.Now.AddDays(-1).ToString(“MM/dd/yyyy”)
DateVariable datatype is string
Hi @Sai17 Actually this code is working ReadDt.AsEnumerable().Where(Function(row) (row(“OrderDate”).ToString = InputDate.ToString)).CopyToDataTable()
If i don’t have 1st row empty. I need only 1 thing to add in this code is to eliminate that null row and proceed with filter that data.
you can use hide row activity. you can download it from manage packages . search balareva easy excel activities. there you can find it
Datatable.AsEnumerable.where(Function(row) row.ItemArray.All(function(col) not string.IsNullOrEmpty(col.ToString))).CopyToDataTable
You can use the below Linq query to delete rows which has empty cells in a datatable
Use assign activity and assign the above query to a new Datatable.
Hide Excel Rows in UiPath | Excel Automation UiPath - YouTube this video might be helpful to you
give a condition that if row is empty then perform this action likewise
Hope this LINQ would be helpful.
(From d In DT.AsEnumerable.Skip(1) where DateTime.Parse(d(1).tostring).Date = now.AddDays(-1).Date select d).CopyToDataTable
Thanks,
Najeer Shaik.
@Learner007 Hope this LINQ would be helpful.
(From d In DT.AsEnumerable.Skip(1) where DateTime.Parse(d(1).tostring).Date = now.AddDays(-1).Date select d).CopyToDataTable
Thanks,
Najeer Shaik.