Data Table - Select row

I scrape data with data scraping and I need filter or count rows.I know how I can count row when I count year(Str.), ExtractDataTable.Select("[Poistený Meno/IČO] = ‘"+ICO+"’ and [Dát.vzniku] like ‘%"+(CInt(Yearinput)-4).ToString+"’") this works perfect, but I have problem when I need know how many rows is 01.01.2014 ago.This syntax doesn’t work ExtractDataTable.Select("[Poistený Meno/IČO] = ‘"+ICO+"’ and [Dát.vzniku] <’"+DateTime+"’"), DateTime=01.01.2014.


Check the below post.

I check this post, but I have still problem.I use this select ****(From p In ExtractDataTable.Select()
Where Convert.ToDateTime((p.Item(“Dát.vzniku”)))<DateTime Select p).ToArray.CopyToDataTable with this error Assign : String was not recognized as a valid DateTime.
Dát.vzniku(Str) format is. “23.11.2015”

Please try.

select ****(From p In ExtractDataTable.Select()
Where Convert.ToDateTime((p.Item(“Dát.vzniku”).replace(".","/")))<DateTime Select p).ToArray.CopyToDataTable

Hi Vivek,

thank you for you advice, but if I use it I have validations error in assign:

any idea?

Thank you.

Best regards


General problem is how can I change general format in data table(excel)??I try create new column and create it during for each row, but I use two ways how can I do it but result is still same.1st format cells to date type and insert value(str) to value (DT) or only Str.replace(".","/").Data in this cells have different format???10.11.2018

Use this

(From p In ExtractDataTable.Select() Where Convert.ToDateTime((p.Item(“Dát.vzniku”)))<DateTime.replace(".","/") Select p).ToArray.CopyToDataTable

We used replace in wrong place. :slightly_smiling_face:

Hi Vivek,
replace we use in right place on left site.I use this select without replace.I must find way, how replace data in excel. I wrote about it above, but now I find way how can I fix it.This isn’t UIpath problem but problem with excel.I add new column behind data array and I use For each row, where I split string and in next step get together.Part(1)+"/"+Part(0)+"/"+Part(2).Now , select works perfect.Thank you for your time and help

1 Like