Hi Everyone
I’m using the filter data table for the expiry date. i have this scenario would like to capture the future date as shown below.
Date expiry
06/09/2025
05/09/2024
05/09/2023
Appreciate your assistance to guide me.
Thanks
Hi Everyone
I’m using the filter data table for the expiry date. i have this scenario would like to capture the future date as shown below.
Date expiry
06/09/2025
05/09/2024
05/09/2023
Appreciate your assistance to guide me.
Thanks
Hi,
Can you share your input data and expected output?
Regards,
Hi Yoichi
My expected data would like to have the 06/09/2026.
Please provide more inputs for the scenario to make us understand better.
If you need to filter the datatable you can use Filter DataTable wizard , please refer below docs
HI,
Can you share actual data as file, if possible? it’s no problem if dummy data.
Basically, the following settings will work
If data is stored as DateTime
If data is stored as String
Regards,
We can perform LINQ Query process to filter the data by converting the String format to DateTime format
Sample Input
- Create a variable to hold all the possible formats of Date-Time in Array
arrayDateTimeFormat = {"dd/MM/yyyy", "MM/dd/yyyy"}
- LINQ Query to filter the dates
dtTable = dtTable.AsEnumerable().Where(Function(x) DateTime.ParseExact(x.Item("DateTime").ToString, arrayDateTimeFormat, Nothing) >= DateTime.Now ).CopyToDataTable
- Result will be store in dtTable
Thanks,
Purushotham