Format a Data Table column using LINQ

Hi @Lalit_Chaudhari

You can use the below LINQ Expression,

DT1.AsEnumerable().Select(Function(row)
    row.SetField("Number", String.Format("{0:0.00}", Convert.ToDouble(row("Number").ToString())))
    Return row
End Function).CopyToDataTable()

You might be using the expression in Assign activity, but you have to use it in the Invoke code activity.

Hope it helps!!

1 Like