How to apply date filter using LINQ in UiPath

Problem statement : We have a datatable that contains the order details for all customers for past few years and we need to extract the data only for one specific year

In the above datatable as you can see we have records from 2021 and 2022 and we need to extract the records for year 2021 only.

Here is how you can do it

Drag the assign activity to the workflow, write the following query

Run the program and see the magic

YouTube: How to apply date filter using LINQ in UiPath - YouTube

Code: UiPathSamples/09 - Date Filter Using Linq at main · manojbatra071/UiPathSamples · GitHub

Medium Article: How to apply date filter using LINQ in UiPath - Manoj Batra - Medium

Happy Automation

1 Like