Filter Data table on expiry date

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.

Hi @James_Yakupt

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
image

If data is stored as String
image

Regards,

HI @James_Yakupt

We can perform LINQ Query process to filter the data by converting the String format to DateTime format

Sample Input
image

  1. Create a variable to hold all the possible formats of Date-Time in Array
arrayDateTimeFormat = {"dd/MM/yyyy", "MM/dd/yyyy"}
  1. LINQ Query to filter the dates
dtTable = dtTable.AsEnumerable().Where(Function(x) DateTime.ParseExact(x.Item("DateTime").ToString, arrayDateTimeFormat, Nothing) >= DateTime.Now ).CopyToDataTable
  1. Result will be store in dtTable

Thanks,
Purushotham

Hi all

I try to screenshot. Appreciate it if you can assist me.

Thanks.