Syntax help in linq

Hi All,
I am not able to identify where ) is expected.
Basic questions but I am struggling over here.

never ommit AsEnumerable

give a retry at

(From row in dtInput.AsEnumerable
Group row by k=row("Trade Date").toString.Trim into grp=Group
Select r=grp.First()).CopyToDataTable

Hi @TUSHAR_DIWASE

You might missed the closed braces in the expression, try using the below expression,

dtInput.AsEnumerable.GroupBy(Function(row) row("Trade Date").ToString).Select(Function(grp) grp.First).Copytodatatable()

Check the below image for better understanding,

Hope it helps!!