How to filter Datatable based on a year?


am reading data from an excel file, and I want to keep only entiers those are from year 2020.

Table looks like (.xslx is attached)

Somehow filter DT is not recognizing 2020 at all. I can´t get a propers result.


Markyear.xlsx (9.2 KB)

1 Like

Filter Date.ParseExact(0, "dd.MM.yyyy", System.Globalization.CultureInfo.InvariantCulture).Year on the left equal to 2020.


Hi Antony,

thanks, but I am still getting an error - “Column type not supported”.

Here is a sequenceYear.xaml|attachment (7.7 KB)


1 Like

I think your link broke. Can you try reuploading the file?

1 Like

Year.xaml (7.7 KB)


1 Like

Change the 0 to "Column-0". I guess it doesn’t like using positional arguments.

1 Like

Hi Anthony,

thanks! The step works, but new error is thrown:


I tried with writing 2020 and “2020” - same issue.Year.xaml (7.8 KB) year.xlsx (9.2 KB)

1 Like

You could use Starts With instead.

Year.xaml (7,7 Ko)

still not working :wink: