Date
Discription
2022-08-31
Gate out empty
2022-08-31
Arrival in
2022-09-05
Loaded
2022-09-05
Vessel departed
2022-09-23
Vessel arrived
2022-09-30
Departure from
2022-10-08
Loaded
2022-10-08
Vessel departed
2022-10-16
Vessel arrived
2022-10-16
Departure from
Always want bottom “departure from” date from datatable.The position is not fixed. How to get it. Some time 1 departure from date available.
If departure from not available output is no data found
If departure from available output is Gateoutdate = 2022-10-16
Hi @satish.rathi59
Since there are multiple ‘Departure From’ data available, can you please confirm whether you need all similar data or only the last one in the data table.
Best Regards.
Hi @satish.rathi59 , please check this.
Condition in ‘Filter Data Table’ -
Code to retrieve required value - Convert.ToDateTime(dt_FilteredData.Rows(dt_FilteredData.RowCount-1).Item(“Date”)).ToString(“yyyy-MM-dd”)
1 Like
Always bottom departure from date require
1 Like
@satish.rathi59
You can use the following query to get the last data:
datatable.asenumerable.where(function(row) row(“discription”).tostring=“Departure from”).toarray.last()
This query will filter out the Departure From data & takes the last row to array.
Hope this helps, let me know if any further assistance is required.
Best Regards.
2 Likes
Manish540
(Manish Shettigar)
March 4, 2023, 8:01am
6
Hi @satish.rathi59 Check this below attached workflow,
Uipath_Get_LastDepartureFromDate.xaml (9.5 KB)
Hope this might help you
1 Like
system
(system)
Closed
March 11, 2023, 5:18pm
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.