Hi,
I’m trying to filter rows from a data table, with date > “2017-30-12” but i don’t got any result.
Did anyone know why ?
Tx
Hi,
I’m trying to filter rows from a data table, with date > “2017-30-12” but i don’t got any result.
Did anyone know why ?
@Hadrien_Poquet
Filter DataTable only works with STRING data type column.
For other data type (int, date), you have to use other way as For Each Row or expressions
@DanielMitchell
Sorry it’s my mistake.
In this case, how can we extract structure data to a datatable variable with datetime type column?
You can try this
Assign dt_WorkItems2 = dt_WorkItems.AsEnumerable().Where(Function(x) CStr(x(“Description”)).Equals(“Verify Account Position”) And Convert.todatetime(x("Date).ToString) >= Convert.todatetime(“2017-12-30”)).CopyToDataTable
To use CopyToDataTable method, you need to add System.Data.DataSetExtension library
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.