Select "Date" in datatables

Hello,

I’m extracting a string datatable, from windows application:

image

how to keep in the datatable only the values that the date are > = Date.ParseExact(Now.addmonths(-1).tostring(“dd-MM-yyyy”),“dd-MM-yyyy”,System.Globalization.CultureInfo.InvariantCulture)

Hi @abdel
please use this activity Filter Data Table

helloreda,

I can’t find this activity, in which package i is installed

Hello abdel,

Here are the informations about the activity.
https://activities.uipath.com/lang-en/docs/filter-data-table

it needs 2018.2 version but what i have is 2018.1.3

Then you should pass by here :wink:

Ohh it’s to bad the filter started from the 18.2
you have to do this the old fashion way

use this instead
yourDataTable = yourDataTable.select("Date >= Now.addmonths(-1).tostring(“dd-MM-yyyy”)).Copytodatatable()

Hi @abdel,

Try below code
dt=dt.select("Column1>=Now.addmonths(-1).tostring("dd-MM-yyyy")).CopyToDataTable()

Regards,
Arivu

Its giving syntax error

1 Like

@reddysrs

use following expression

dt.select(“Convert([ColumnName] ,System.DateTime) > Convert('”+today.addmonths(-1)+“’ , System.DateTime)”)

please do let me know if you need any help

br,Aditya