Filter Date from datatable after scraping from web

Hi,

Can you try the following expression?

ExtractDataTable = ExtractDataTable.AsEnumerable.Where(Function(r) DateTime.Parse(r("PRDDATE").ToString)>=New DateTime(2021,12,1) AndAlso DateTime.Parse(r("PRDDATE").ToString)<=New DateTime(2021,12,10)).CopyToDataTable

Note: If there is invalid date string/character (including empty) in PRDDATE column, the aboce will fails.

Regards,

1 Like