I am brand new to UiPath. I need to extract a csv file of times that are after 5pm and before 6am into a new excel file. The csv file with the times has other information that I don’t need. I need just the times filtered. How do I go about doing this?
Assign Activity:
filteredDataTable = (From row In yourDataTableVar.AsEnumerable()
Let entryTime = DateTime.ParseExact(row("EntryTimeColumn").ToString, "h:mm tt", CultureInfo.InvariantCulture)
Let exitTime = DateTime.ParseExact(row("ExitTimeColumn").ToString, "h:mm tt", CultureInfo.InvariantCulture)
Where entryTime.Hour >= 17 And exitTime.Hour < 6
Select row).CopyToDataTable
Replace “EntryTimeColumn” and “ExitTimeColumn” with the actual column names that contain the entry and exit times in your DataTable filteredDataTable is of Data Type System.Data.DataTable