Reputation: 471
I have a datatable "dt" with a column "
datetime"(format 'dd/MM/yyyy hh:mm:ss AM/PM')
i need to retrieve the set of rows such that
dt.select("datetime='"& dateString &"'").rows
where "dateString
" has a date format "dd/MM/yyyy
"
Upvotes: 0
Views: 1552
Reputation: 71
Using Linq
dt = dt.AsEnumerable.Where(Function(x) x.Field(Of String)("datetime").Substring(0, 9) = datestring).CopyToDataTable
Upvotes: 2