To sum all the values of a column in datatable by converting column datatype to double

Hi All,

I want to add all the values of a column in datatable by converting the column values to double datatype.

Regards,
Pavan H.

try this:
DataTable.AsEnumerable.Sum(Function(x) Convert.ToDouble(x(“COL_Name”).ToString.Trim) ).ToString

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.