Use of Absolute Function in Datatable Select Query

activities
studio
uipath

#1

Input: Datatable with a single column and values as below
-98.05
-56
75.28
10.42

Requirement: To get values which have absolute value greater than 25
Expected Output: -98.05,-56,75.28
Current Logic Implemented: DT1.select(“Convert(Column1,‘System.Double’))>’”+Var.ToString+"’").CopyToDataTable
This is providing output as 75.28 only which is incorrect.

Need help…!!!


#3

Hi @PrachiSinghDeloitte,

Try this one.
(From dr in DT1 where Math.abs(Convert.ToInt32(dr.item(“Column1”)))>
Convert.ToInt32(Var) select dr).ToArray().CopyToDataTable()`